]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix CREATE TABLE LIKE with not-valid check constraint
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 10 Sep 2025 09:49:53 +0000 (11:49 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 10 Sep 2025 11:25:34 +0000 (13:25 +0200)
commit21fdc37d219acebd298d2e7b309b111a5174ae4c
tree698c92f8729bdc10c59e0c24d5d841554bba237e
parenta7024398b80a836a83c00af42c6ab7cc25c12087
Fix CREATE TABLE LIKE with not-valid check constraint

In CREATE TABLE ... LIKE, any check constraints copied from the source
table should be set to valid if they are ENFORCED (the default).

Bug introduced in commit ca87c415e2f.

Author: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/CACJufxH%3D%2Bod8Wy0P4L3_GpapNwLUP3oAes5UFRJ7yTxrM_M5kg%40mail.gmail.com
src/backend/parser/parse_utilcmd.c
src/test/regress/expected/create_table_like.out
src/test/regress/sql/create_table_like.sql