]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Revise psycopg2 execute_values approach
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Aug 2019 02:38:51 +0000 (22:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 Aug 2019 17:25:25 +0000 (13:25 -0400)
commit078642bec1bb5709a8255d45702258a581615832
treeaa7ef9d7214fbb9bb2257418d6bc69005726889b
parentd1d15c9d6060d5ea7529256e830d5134a9a8f91a
Revise psycopg2 execute_values approach

Revised the approach for the just added support for the psycopg2
"execute_values()" feature added in 1.3.7 for :ticket:`4623`.  The approach
relied upon a regular expression that would fail to match for a more
complex INSERT statement such as one which had subqueries involved.   The
new approach matches exactly the string that was rendered as the VALUES
clause.

Fixes: #4623
Change-Id: Icaae0f7b6bcf87a2cf5c6290a839c8429dd5fac3
(cherry picked from commit 0a7ca00e04f7c1cfdbb8bdfe7da5f62fc9b40930)
doc/build/changelog/unreleased_13/4623.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/sql/compiler.py
test/dialect/postgresql/test_dialect.py