简体   繁体   中英

Invalid Message Format on Postgresql using Docker

Don't know if it is a docker related problem, or a postgres one.

I'm having problems when executing "long" queries, such as:

INSERT INTO schema.table VALUES
(1111111, 1111, 'whatever'),
(1111112, 2222, 'any other'),
...
(1111113, 3333, 'something else');

with 200+ lines.

The 209 lines give a string length of 8746 characters (not that much, I know, although it is more than 8KB (+16 KB as Unicode).

Unable to execute via psql, pgAdmin or using a .NET application.

  1. Is there any limit on SQL strings? (using local postgres works just fine)
  2. Any kind of configuration that needs to be hacked?

More Info: If I divide the sql into 209 instructions, as:

INSERT INTO schema.table VALUES (1111111, 1111, 'whatever');
INSERT INTO schema.table VALUES (1111112, 2222, 'any other');
...
INSERT INTO schema.table VALUES (1111113, 3333, 'something else');

the query executes just fine (no problem with the size, even if it is a single string with all the instructions

Thanks for the feedback.

After some more digging, I found out the problem is on the docker for windows beta.

Somehow the connection through the exposed port (localhost:port).

More details can be found here: https://forums.docker.com/t/localhost-port-forwarding-causing-invalid-sql/17719 .

Thanks for the interest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM