]> 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:17 +0000 (13:25 -0400)
commit0a7ca00e04f7c1cfdbb8bdfe7da5f62fc9b40930
tree46bb9902bc536d4cf4655b20f68b531725ccf898
parentd1948bc69bd0d26fbff77d7525ef899a2a9a580d
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
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