>>
>> 	create unique index child_id_index on child (id);

>Thanks a lot. You saved my day :-)))

Always feels good to be able to help :-)

> > > CREATE TABLE will create implicit trigger(s) for FOREIGN 
> KEY check(s)
> > > ERROR:  UNIQUE constraint matching given keys for referenced
> > > table "child"
> > > not found
> >
> > Then the above works.
> > Actually the error message sounds sufficiently clear to me, no?
> 
> I retrospect, yes. Still, I think inheritance could/should do that for me 
> automatically. Is there a good reason why it doesn't ?

None, other that 1. noone implemented it and 2nd there was no generally 
accepted plan on how this should work.

e.g. should the unique index for the serial span the whole hierarchy,
or should a separate index be created for each table ?

As a hint I would keep my fingers off inheritance as it stands now, 
since all it is good for is to save you some typing for the create table
statements. It currently has almost no other functionality except to 
give you the supertable columns for all rows in the hierarchy if you
select * from supertable.

Andreas

Wed, 13 Dec 2000 15:05:34 +0100
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
AW: AW: PLEASE help with foreign key and inheritance pr
	oble m