]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Extract format_constraint truncation rules to ON CONFLICT
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Jul 2021 22:19:08 +0000 (18:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Jul 2021 14:15:07 +0000 (10:15 -0400)
commit0e46359cb00b453448e37ec16fce744f73c98581
tree1be1d75ff64887dc134a9b424c154339b95ba862
parentca52e87268fec966f6005b1e4aa30206ae895e9e
Extract format_constraint truncation rules to ON CONFLICT

Fixed issue where a too-long constraint name rendered as part of the "ON
CONFLICT ON CONSTRAINT" element of the :class:`_postgresql.Insert`
construct due to naming convention generation would not correctly truncate
the name in the same way that it normally renders within a CREATE TABLE
statement, thus producing a non-matching and too-long constraint name.

Fixes: #6755
Change-Id: Ib27014a5ecbc9cd5861a396f8bb49fbc60bf49fe
doc/build/changelog/unreleased_14/6755.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/sql/compiler.py
test/dialect/postgresql/test_compiler.py