Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ildar Musin <ildar@adjust.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-02-19T23:02:21Z
Lists: pgsql-hackers
Ildar Musin <ildar@adjust.com> writes: > My colleague Chris Travers discovered something that looks like a bug. > Let's say we have a table with a constraint that is declared as NO INHERIT. > ... > Now when we want to make a copy of the table structure into a new table > the `NO INHERIT` option is ignored. Hm, I agree that's a bug, since the otherwise-pretty-detailed CREATE TABLE LIKE documentation makes no mention of such a difference between original and cloned constraint. However, I'd be disinclined to back-patch, since it's barely possible somebody out there is depending on the existing behavior. regards, tom lane
Commits
-
Ensure that CREATE TABLE LIKE copies any NO INHERIT constraint property.
- cacef172237f 13.0 landed