Re: BUG #5495: RI/FK on self and inherited table

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Martin Edlman" <edlman(at)fortech(dot)cz>,<pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5495: RI/FK on self and inherited table
Date: 2010-06-09 18:56:13
Message-ID: 4C0F9D7D02000025000320EF@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Martin Edlman" <edlman(at)fortech(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2010-06-09 19:38:10 Re: Invalid YAML output from EXPLAIN
Previous Message Robert Haas 2010-06-09 18:50:52 Re: Invalid YAML output from EXPLAIN