Re: cataloguing NOT NULL constraints - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: cataloguing NOT NULL constraints
Date
Msg-id 20220823164926.qscpp3lbtgs3nvbk@alvherre.pgsql
Whole thread Raw
In response to Re: cataloguing NOT NULL constraints  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: cataloguing NOT NULL constraints
List pgsql-hackers
On 2022-Aug-22, Amit Langote wrote:

> Yeah, I think it makes sense to think of the NOT NULL constraints on
> their own in this case, without worrying about the PK constraint that
> created them in the first place.

Cool, that's enough votes that I'm comfortable implementing things that
way.

> BTW, maybe you are aware, but the legacy inheritance implementation is
> not very consistent about wanting to maintain the same NULLness for a
> given column in all members of the inheritance tree.  For example, it
> allows one to alter the NULLness of an inherited column:

Right ... I think what gives this patch most of its complexity is the
number of odd, inconsistent cases that have to preserve historical
behavior.  Luckily I think this particular behavior is easy to
implement.

> IIRC, I had tried to propose implementing the same behavior for legacy
> inheritance back in the day, but maybe we left it alone for not
> breaking compatibility.

Yeah, that wouldn't be surprising.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"The problem with the facetime model is not just that it's demoralizing, but
that the people pretending to work interrupt the ones actually working."
                                                           (Paul Graham)



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)
Next
From: Zhihong Yu
Date:
Subject: Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)