PLEASE help with foreign key and inheritance problem - Mailing list pgsql-hackers

From Horst Herb
Subject PLEASE help with foreign key and inheritance problem
Date
Msg-id 00121322342706.03185@munin.midgard
Whole thread Raw
List pgsql-hackers
I stated this before, but I did not get a helpful answer. I might have 
misunderstood tghe documentation on foreign keys:

create table global(id serial);
create table child(anything text) inherits(global);
insert into child(anything) values ('test);

Now, a select * from child shows
id    anything
-------------
1    test

So far, so good.

create table dependend(globid int4 references child(id) on update cascade on 
delete cascade);

gives me an error: 
CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
ERROR:  UNIQUE constraint matching given keys for referenced table "child" 
not found  

Once again, _why_ is this? What would inheritance be good for if I can't use 
it this way? Bad enough that inheritance of triggers or constraints doesn't 
work, but a simple refernce to a attribute should be possible, shouldn't it?

If there is a good reason not to allow it, I would like to know. If not, I 
would be willing to help out implementing it, if somebody points me into the 
right direction in the code (or documentation)

Horst


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Locale and multibyte support in 7.1
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: PLEASE help with foreign key and inheritance proble m