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)