git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: dbf05a1) | patch
Ensure that CREATE TABLE LIKE copies any NO INHERIT constraint property.
2020年3月10日 18:54:00 +0000 (14:54 -0400)
2020年3月10日 18:54:00 +0000 (14:54 -0400)
commit cacef172237fd3426b578f81b7414c0de56cbaaf
Ensure that CREATE TABLE LIKE copies any NO INHERIT constraint property.

Since the documentation about LIKE doesn't say that a copied constraint
has properties different from the original, it seems that ignoring
a NO INHERIT property doesn't meet the principle of least surprise.
So make it copy that.

(Note, however, that we still don't copy a NOT VALID property;
CREATE TABLE offers no way to do that, plus it seems pointless.)

Arguably this is a bug fix; but no back-patch, as it seems barely
possible somebody is depending on the current behavior.

Ildar Musin and Chris Travers; reviewed by Amit Langote and myself

Discussion: https://postgr.es/m/CAONYFtMC6C+3AWCVp7Yd8H87Zn0GxG1_iQG6_bQKbaqYZY0=-g@mail.gmail.com
src/backend/parser/parse_utilcmd.c diff | blob | blame | history
src/test/regress/expected/create_table_like.out diff | blob | blame | history
src/test/regress/sql/create_table_like.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /