Skip site navigation (1) Skip section navigation (2)

reference to inherited column in parent

From: "Rumi Szabolcs" <szrumi(at)matavnet(dot)hu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: reference to inherited column in parent
Date: 2001-10-27 06:08:13
Message-ID: 200110270808130680.00D629F6@mail.local (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs

i experienced the following problem with postgresql:


=# create table parent (a integer unique not null);
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'parent_a_key' for table 'parent'
=# create table child (b integer) inherits (parent);
=# create table other (c integer references parent (a));
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
=# 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;
(1 row)


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...


Szabolcs Rumi


pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-10-27 07:05:34
Subject: Bug #492: corrupt pg_language_oid_index, (how to fix?)
Previous:From: Marcelo (AdSolutions)Date: 2001-10-26 18:34:12
Subject: Problems when inserting a very large sequence of records

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group