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

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 (view raw or flat)
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

pgsql-bugs by date

Next:From: Dean RasheedDate: 2010-06-09 19:38:10
Subject: Re: Invalid YAML output from EXPLAIN
Previous:From: Robert HaasDate: 2010-06-09 18:50:52
Subject: Re: Invalid YAML output from EXPLAIN

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