]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
don't enable "fast insert executemany" for ON CONFLICT etc
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 4 Jun 2021 23:45:45 +0000 (19:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 4 Jun 2021 23:45:45 +0000 (19:45 -0400)
commitb2cd9aca54d1625dde31abebf7f11149c9b7c636
tree1ee7b31a3c549d8410875113932c1f1cc85cd94c
parent3874d2576dc536b54af9f5525aff1fe59f4f00d3
don't enable "fast insert executemany" for ON CONFLICT etc

Fixed issue where using the PostgreSQL "INSERT..ON CONFLICT" structure
would fail to work with the psycopg2 driver if it were used in an
"executemany" context along with bound parameters in the "SET" clause, due
to the implicit use of the psycopg2 fast execution helpers which are not
appropriate for this style of INSERT statement. Additional checks to
exclude this kind of statement from that particular extension have been
added.

Fixes: #6581
Change-Id: I3d6169e7e188dc087d1d1bfba9a42162db183265
doc/build/changelog/unreleased_14/6581.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/dialect/postgresql/test_on_conflict.py