FK to inherited table, referential integrity violation - Mailing list pgsql-general

From yacht@seznam.cz
Subject FK to inherited table, referential integrity violation
Date
Msg-id 20030820185833.GC28215@lgm
Whole thread Raw
Responses Re: FK to inherited table, referential integrity violation
List pgsql-general
Is it bug?

CREATE TABLE base ( base INT PRIMARY KEY );
CREATE TABLE child ( val INT ) INHERITS ( base );
CREATE TABLE ref (
      atr INT
    , base INT REFERENCES base ON UPDATE cascade ON DELETE cascade );

INSERT INTO child VALUES ( 1, 2 );

SELECT * FROM base;
 base
------
    1

SELECT * FROM child;
 base | val
------+-----
    1 |   2

INSERT INTO ref VALUES ( 3, 1 );

ERROR:  $1 referential integrity violation - key referenced from ref not
found in base

--
 oo  don't worry
\__/ be happy

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Buglist
Next
From: Ron Johnson
Date:
Subject: Re: Grouping by date range