Re: [Bizgres-general] A Guide to Constraint Exclusion
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndquadrant.com>
To: Hannu Krosing <hannu@skype.net>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgresql.org
Date: 2005-07-15T12:35:33Z
Lists: pgsql-hackers
On Fri, 2005-07-15 at 11:10 +0300, Hannu Krosing wrote: > Bruce: could you change this TODO item > > o Prevent child tables from altering constraints like CHECK that were > inherited from the parent table > > to > > o Prevent new child tables from inheriting constraints defined on > parents with keyword ONLY: > alter table ONLY t add constraint c check(x=y); > Prevent child tables from altering constraints that were > inherited from the parent table (i.e were defined without > ONLY/with ALL) My thought was to introduce a new type of constraint, ABSTRACT. This would not be inherited (it is not a check constraint). It would allow a table to be declared "will never contain rows". This fits better with the ideas and common understandings of inheritance. Best Regards, Simon Riggs