From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1146: REFERENCES doesn't work on Inherited Tables |
Date: | 2004-05-06 11:36:42 |
Message-ID: | 20040506113642.D7DB3CF54B9@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1146
Logged by: Gbor Katona
Email address: katonag(at)dragon(dot)klte(dot)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'.
From | Date | Subject | |
---|---|---|---|
Next Message | PostgreSQL Bugs List | 2004-05-06 14:11:54 | BUG #1147: Getting rid of LD_LIBRARY_PATH |
Previous Message | Sean Chittenden | 2004-05-06 05:50:50 | Re: [GENERAL] cache lookup of relation 165058647 failed |