]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: avoid all uses of PQconn.send_query in pipeline mode
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 23 Aug 2022 22:39:40 +0000 (00:39 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 23 Aug 2022 23:20:11 +0000 (01:20 +0200)
commite507918489aad84df730b54b7da53b45b4550ba3
tree30a114fb5fb959bd4861382fe790fa58a6cf3535
parentdacb6afa05b1a308e37a60431dc04e9385eead38
fix: avoid all uses of PQconn.send_query in pipeline mode

We stopped using it in normal querying because, until libpq 14.4, the
libpq complained about "message type 0x33 arrived from server while
idle" (see #314). But usage remained for internal queries such as BEGIN.

In libpq 14.5, Postgres devs tried to fix the issue... and broke
PQsendQuery altogether :(

Hopefully the issue will be solved in future libpq versions, but we can
work around it completely.

Close #350.
psycopg/psycopg/_pipeline.py
psycopg/psycopg/connection.py
tests/pq/test_pq.py
tests/scripts/pipeline-demo.py
tests/test_generators.py