Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR
Дата
Msg-id 685289dd-9ee8-45c4-8b67-268c60645dfe@manitou-mail.org
обсуждение исходный текст
Ответ на BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список 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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR