Re: BUG #5495: RI/FK on self and inherited table - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #5495: RI/FK on self and inherited table
Date
Msg-id 4C0F9D7D02000025000320EF@gw.wicourts.gov
Whole thread Raw
In response to BUG #5495: RI/FK on self and inherited table  ("Martin Edlman" <edlman@fortech.cz>)
List pgsql-bugs
"Martin Edlman" <edlman@fortech.cz> wrote:

> ERROR:  insert or update on table "device" violates foreign key
> constraint "device_parent_id_fkey"
> DETAIL:  Key (parent_id)=(19947) is not present in table "device".
>
> But the record is there, it was inserted into net.computer so it's
> selectable from net.device and from net.computer.

This is not a bug, but a known limitation.  Bring up this page and
look for the places it mentions "foreign key":

http://www.postgresql.org/docs/8.4/interactive/ddl-inherit.html

-Kevin

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Invalid YAML output from EXPLAIN
Next
From: Dean Rasheed
Date:
Subject: Re: Invalid YAML output from EXPLAIN