]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use pg_get_constraintdef for CHECK constraint reflection
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 24 Jan 2019 21:56:44 +0000 (16:56 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 25 Jan 2019 00:26:11 +0000 (19:26 -0500)
commitd5a6ea929609070b28e9b1ca70f1f60c7bfa40fb
tree56cb39a51c499ed858284cc532689de9b65ab1cc
parent0491d7b4130e7e81d66f4426533ba44ea8bbcf18
Use pg_get_constraintdef for CHECK constraint reflection

Revised the query used when reflecting CHECK constraints to make use of the
``pg_get_constraintdef`` function, as the ``consrc`` column is being
deprecated in PG 12.  Thanks to John A Stevenson for the tip.

Fixes: #4463
Change-Id: Ie0ee9bdfddb0635db72b35c2e2e4b27f154162fd
(cherry picked from commit 377f12696bb1af17bb14f676a49ef21428d537d3)
doc/build/changelog/unreleased_12/4463.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
test/dialect/postgresql/test_reflection.py