Re: BUG #5555: ALTER TABLE ONLY ... SET NOT NULL on parent prevent prior inherited tables from being restored - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5555: ALTER TABLE ONLY ... SET NOT NULL on parent prevent prior inherited tables from being restored
Date
Msg-id 23109.1278959959@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5555: ALTER TABLE ONLY ... SET NOT NULL on parent prevent prior inherited tables from being restored  ("Michael Glaesemann" <grzm@seespotcode.net>)
Responses Re: BUG #5555: ALTER TABLE ONLY ... SET NOT NULL on parent prevent prior inherited tables from being restored
List pgsql-bugs
"Michael Glaesemann" <grzm@seespotcode.net> writes:
> If you add a column to a parent table with no NOT NULL constraint and then
> add the NOT NULL constraint on the parent using ALTER TABLE ONLY (so only
> future tables inheriting from the parent have the constraint), the dump file
> does not indicate that those children created prior to the ALTER TABLE ONLY
> have no NOT NULL constraint.

Yeah.  Past discussions of this have leaned to the viewpoint that we
should disallow the above, ie it should not be possible to have NOT NULL
on the parent unless all the children have it too.  Nobody's got round
to implementing it though.  There's a TODO item for it: see
    "Move NOT NULL constraint information to pg_constraint"

            regards, tom lane

pgsql-bugs by date:

Previous
From: Antonio Rivas Valle
Date:
Subject: Bad localization in psql (french version) for Windows
Next
From: Peter Eisentraut
Date:
Subject: Re: Bad localization in psql (french version) for Windows