reference to inherited column in parent - Mailing list pgsql-bugs

From Rumi Szabolcs
Subject reference to inherited column in parent
Date
Msg-id 200110270808130680.00D629F6@mail.local
Whole thread Raw
Responses Re: reference to inherited column in parent  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-bugs
Hello!

i experienced the following problem with postgresql:

---8<-------------------------------------

=# create table parent (a integer unique not null);
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'parent_a_key' for table 'parent'
CREATE
=# create table child (b integer) inherits (parent);
CREATE
=# create table other (c integer references parent (a));
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
CREATE
=# insert into child values (1, 2);
INSERT 53863 1
=# insert into other values (1);
ERROR:  <unnamed> referential integrity violation - key referenced from other not found in parent
=# select * from parent;
 a
---
 1
(1 row)

---8<-------------------------------------

i am really far from having a clue about pgsql, but this doesn't
seem to be the correct behaviour to me, i don't know whether
this is accidental or not...

Regards,

Szabolcs Rumi

pgsql-bugs by date:

Previous
From: Bruno Wolff III
Date:
Subject: Porting issue with openssl and no /dev/random
Next
From: "Andy Hallam"
Date:
Subject: Select with backslash '\' character