BUG #1146: REFERENCES doesn't work on Inherited Tables

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1146: REFERENCES doesn't work on Inherited Tables
Дата
Msg-id 20040506113642.D7DB3CF54B9@www.postgresql.com
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1146
Logged by:          Gábor Katona

Email address:      katonag@dragon.klte.hu

PostgreSQL version: 7.3.4

Operating system:   Cygwin

Description:        REFERENCES doesn't work on Inherited Tables

Details:

  The inserting of a row into a table doesn't reflect in the mother table
when the mother table is referenced from a third one.

Example
'a' is the mother table, 'b' is the child, and there is a reference to 'a'
in table 'c'

create table a( id INT UNIQUE, name VARCHAR);
create table b( foofoo INT) INHERITS(a);
create table c (id INT UNIQUE, bar INT, foo  INT REFERENCES "a"("id"));

insert into b VALUES (1,'first',0);
insert into b VALUES (2,'second',3);

Then inserting into 'c'

insert into c values (1,3,2);

and the result is unfortunately:
$1 referential integrity violation - key referenced from c not found in a

which means, that id=2 is not in table 'a'.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Sean Chittenden
Дата:
Сообщение: Re: [GENERAL] cache lookup of relation 165058647 failed
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1147: Getting rid of LD_LIBRARY_PATH