Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: rekgrpth@gmail.com,pgsql-bugs@lists.postgresql.org
Date: 2021-10-20T09:21:10Z
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
Commits
-
Pipeline mode disallows multicommand strings
- c829fbc3dc93 14.1 landed
- 105c1de01974 15.0 landed