Re: questions about not-null constraints and inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "K(dot) Srinath" <k(dot)srinath(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: questions about not-null constraints and inheritance
Date: 2009-04-02 17:39:23
Message-ID: 12187.1238693963@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"K. Srinath" <k(dot)srinath(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-04-02 17:40:30 Re: psql \d commands and information_schema
Previous Message Sam Mason 2009-04-02 17:35:40 Re: [HACKERS] string_to_array with empty input