From: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
---|---|
To: | rekgrpth(at)gmail(dot)com,pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR |
Date: | 2021-10-20 09:21:10 |
Message-ID: | 685289dd-9ee8-45c4-8b67-268c60645dfe@manitou-mail.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PG Bug reporting form wrote:
> I use libpq in C.
> I call PQsendQuery(conn, "select * from cats; select * from cats") after
> PQenterPipelineMode.
> This cause ERROR
> cannot insert multiple commands into a prepared statement.
> postgresql client 14
> postgresql server 13.4
In pipeline mode, queries are handled with the extended query protocol
which does not support multiple commands per query.
This is mentioned in this note in the documentation
(see
https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY)
"The query string contained in a Parse message cannot include more than
one SQL statement; else a syntax error is reported. This restriction
does not exist in the simple-query protocol, but it does exist in the
extended protocol, because allowing prepared statements or portals to
contain multiple commands would complicate the protocol unduly."
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2021-10-20 15:01:33 | Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR |
Previous Message | Michael Paquier | 2021-10-20 03:47:04 | Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable |