]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: only flush the pipeline after executemany if returning
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 29 Mar 2022 12:26:26 +0000 (14:26 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 2 Apr 2022 23:23:22 +0000 (01:23 +0200)
commit040ee0c4f754296aafbb71996e43e56b10537bcb
tree2be24bc88e7d1cc0dbd7b534f88006c80fbf74dc
parentbcb1688bc0ad551cafab53cbad6a503d09c172d7
fix: only flush the pipeline after executemany if returning

This has the side effect of breaking rowcount, as before, but can send
many executemany in the same pipeline.

`rowcount` is correct if `returning=True` is set instead, which is a
thing we can at least document, and makes sense: "if you want a result,
you flush the pipeline, dude".
psycopg/psycopg/connection.py
psycopg/psycopg/connection_async.py
psycopg/psycopg/cursor.py
tests/test_pipeline.py
tests/test_pipeline_async.py