]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix and test sequences w/ executemany in pre-exec scenarios
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 31 Aug 2021 17:34:43 +0000 (13:34 -0400)
committermike bayer <mike_mp@zzzcomputing.com>
Thu, 2 Sep 2021 14:01:56 +0000 (14:01 +0000)
commitbf1fe670513abeb1596bc5266f50db1ffe62f3bd
tree95509c88bfe615271d5953db74b019ec7fb37b79
parenta4fc07fae69aa130fc032e7b5204f2e1fe3acaa3
Fix and test sequences w/ executemany in pre-exec scenarios

Fixed issue where an engine that had ``implicit_returning`` set to False
would fail to function when PostgreSQL's "fast insertmany" feature were
used in conjunction with a ``Sequence``, as well as if any kind of
"executemany" with "return_defaults()" were used in conjunction with a
``Sequence``. Note that PostgreSQL "fast insertmany" uses "RETURNING" by
definition, when the SQL statement is passed to the driver; overall, the
``implicit_returning`` flag is legacy and has no real use in modern
SQLAlchemy, and will be deprecated in a separate change.

Fixes: #6963
Change-Id: Id8e3dd50a21b9124f338067b0fdb57b8f608dca8
doc/build/changelog/unreleased_14/6963.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
test/sql/test_sequences.py