On N, 2005-07-14 at 00:13 +0300, Hannu Krosing wrote: > On K, 2005-07-13 at 11:53 +0100, Simon Riggs wrote: > > > > > We aren't able to exclude the parent table from the above query because > > no Constraint was defined upon it. Since, in our example, the parent is > > empty there will be little effect on the query performance. It would be > > a mistake to attempt to get around this by placing a Constraint on the > > parent, since that would then automatically be created on all child > > tables also. So we can never exclude the parent without automatically > > excluding *all* of the children also.
hannu=# create table ttt(id serial, t text); NOTICE: CREATE TABLE will create implicit sequence "ttt_id_seq" for "serial" co lumn "ttt.id" CREATE TABLE hannu=# create table ttt2() inherits (ttt); CREATE TABLE hannu=# alter table ONLY ttt add constraint ccc check(false); ALTER TABLE this also works, but new inherited tables will still inherit the constraint. Perhaps we just need a way to store the "ONLY" status of the constraint, and then not inherit these. -- Hannu Krosing <[EMAIL PROTECTED]> ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly