Re: questions about not-null constraints and inheritance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: questions about not-null constraints and inheritance
Date
Msg-id 12187.1238693963@sss.pgh.pa.us
Whole thread Raw
In response to questions about not-null constraints and inheritance  ("K. Srinath" <k.srinath@gmail.com>)
List pgsql-hackers
"K. Srinath" <k.srinath@gmail.com> writes:
> Why is this so?

Because we don't track inheritance state for attnotnull.  There is no
way you can make it work right with marginal hacking on the ATExec
code, because there just isn't enough state.

The correct fix is probably the one alluded to in another thread today:
make NOT NULL constraints have pg_constraint entries like CHECK
constraints do.  As of 8.4 there is enough info tracked for check
constraints (cf conislocal and coninhcount) to make inheritance handle
all these corner cases.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Werner Echezuria
Date:
Subject: Re: Sort a column that does not exist
Next
From: Bruce Momjian
Date:
Subject: Re: psql \d commands and information_schema