Re: Strange presentaion related to inheritance in \d+

2023-08-29 Thread Kyotaro Horiguchi
At Tue, 29 Aug 2023 19:28:28 +0200, Alvaro Herrera wrote in > On 2023-Aug-29, Kyotaro Horiguchi wrote: > > > Attached is the initial version of the patch. It prevents "CREATE > > TABLE" from executing if there is an inconsisntent not-null > > constraint. Also I noticed that "ALTER TABLE t ADD

Re: Strange presentaion related to inheritance in \d+

2023-08-29 Thread Alvaro Herrera
On 2023-Aug-29, Kyotaro Horiguchi wrote: > Attached is the initial version of the patch. It prevents "CREATE > TABLE" from executing if there is an inconsisntent not-null > constraint. Also I noticed that "ALTER TABLE t ADD NOT NULL c NO > INHERIT" silently ignores the "NO INHERIT" part and fixed

Re: Strange presentaion related to inheritance in \d+

2023-08-28 Thread Kyotaro Horiguchi
At Mon, 28 Aug 2023 13:36:00 +0200, Alvaro Herrera wrote in > On 2023-Aug-28, Kyotaro Horiguchi wrote: > > > But with these tables: > > > > create table p (a int, b int not null default 0); > > create table c1 (a int, b int not null NO INHERIT default 1) inherits (p); > > > > I get: > > > >

Re: Strange presentaion related to inheritance in \d+

2023-08-28 Thread Alvaro Herrera
On 2023-Aug-28, Kyotaro Horiguchi wrote: > But with these tables: > > create table p (a int, b int not null default 0); > create table c1 (a int, b int not null NO INHERIT default 1) inherits (p); > > I get: > > > Not-null constraints: > >"c1_b_not_null" NOT NULL "b" *NO INHERIT* > > Here,

Strange presentaion related to inheritance in \d+

2023-08-28 Thread Kyotaro Horiguchi
While translating a message, I found a questionable behavior in \d+, introduced by a recent commit b0e96f3119. In short, the current code hides the constraint's origin when "NO INHERIT" is used. For these tables: create table p (a int, b int not null default 0); create table c1 (a int, b int not