Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-03-10 Thread Tom Lane
Amit Langote writes: > On Thu, Feb 20, 2020 at 8:20 AM David G. Johnston > wrote: >> Not sure I agree with the premise that it is not supposed to be copied; is >> there some other object type the allows NO INHERIT that isn't copied when >> CREATE TABLE LIKE is used and check constraints are the

Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-02-19 Thread Amit Langote
On Thu, Feb 20, 2020 at 8:20 AM David G. Johnston wrote: > On Wed, Feb 19, 2020 at 4:02 PM Tom Lane wrote: >> Ildar Musin 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. >> > ...

Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-02-19 Thread Amit Langote
On Thu, Feb 20, 2020 at 8:02 AM Tom Lane wrote: > Ildar Musin 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

Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-02-19 Thread David G. Johnston
On Wed, Feb 19, 2020 at 4:02 PM Tom Lane wrote: > Ildar Musin 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 in

Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-02-19 Thread Tom Lane
Ildar Musin 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 ag

Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-02-19 Thread Ildar Musin
Hi hackers, 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. CREATE TABLE test ( x INT CHECK (x > 0) NO INHERIT ); \d test Table "public.test" Column | Type | Collation | Null