From: | Horst Herb <hherb(at)malleenet(dot)net(dot)au> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | PLEASE help with foreign key and inheritance problem |
Date: | 2000-12-13 11:34:27 |
Message-ID: | 00121322342706.03185@munin.midgard |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2000-12-13 11:46:15 | Re: Locale and multibyte support in 7.1 |
Previous Message | Anatoly K. Lasareff | 2000-12-13 11:06:16 | Locale and multibyte support in 7.1 |