PLEASE help with foreign key and inheritance problem

Поиск
Список
Период
Сортировка
От Horst Herb
Тема PLEASE help with foreign key and inheritance problem
Дата
Msg-id 00121322342706.03185@munin.midgard
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Locale and multibyte support in 7.1
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: PLEASE help with foreign key and inheritance proble m