]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
PGDialect.get_check_constraints: Handle "NOT VALID"
authorBill Finn <bill@angaza.com>
Tue, 27 Aug 2019 16:21:57 +0000 (12:21 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 Aug 2019 16:54:04 +0000 (12:54 -0400)
commit3980a9a455d08c5073cabc3c2b77de46fa36d7b4
tree7c4c4634dfaf9bf1de13f7315bd8424cc1b356fa
parent5bf264ca08b8bb38d50baeb48fe1729da4164711
PGDialect.get_check_constraints: Handle "NOT VALID"

Added support for reflection of CHECK constraints that include the special
PostgreSQL qualifier "NOT VALID", which can be present for CHECK
constraints that were added to an exsiting table with the directive that
they not be applied to existing data in the table. The PostgreSQL
dictionary for CHECK constraints as returned by
:meth:`.Inspector.get_check_constraints` may include an additional entry
``dialect_options`` which within will contain an entry ``"not_valid":
True`` if this symbol is detected.   Pull request courtesy Bill Finn.

Fixes: #4824
Closes: #4825
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4825
Pull-request-sha: a0e1ab133c2d46521a74e55423ac2ba866682dae

Change-Id: I78365f50055c95474c92124b85df66c5c80c00c8
doc/build/changelog/unreleased_13/4824.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/engine/reflection.py
test/dialect/postgresql/test_reflection.py