]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Avoid multiple commands in transaction code
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 2 Dec 2021 14:13:08 +0000 (15:13 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 2 Apr 2022 23:17:57 +0000 (01:17 +0200)
commitcadcdc0cb0742d48f283513d73516579a767e8d5
tree588a541f9704f2cc3d8dbb66e4740c72ddabfbe9
parent2a4d5fdcfa308888ead0e60595e4bd8961a9f38b
Avoid multiple commands in transaction code

In pipeline mode, command strings containing multiple SQL commands are
disallowed so we remove all such usages from transaction code.

Accordingly, all generator methods in transaction classes now do not
return anything (the result was not used previously anyways).

In tests, the 'commands' list defined in patch_exec() is now filled by
appending instead of inserting so that we keep the natural order of
commands in assertions.
psycopg/psycopg/transaction.py
tests/fix_db.py
tests/test_transaction.py
tests/test_transaction_async.py