Re: Bug list?

From: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
To: Micah Yoder <yodermk(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bug list?
Date: 2001-06-25 15:27:41
Message-ID: Pine.LNX.4.21.0106251125340.27771-100000@aluminum.cs.pitt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The answer is that the referential integrity constraint doesn't span across subclasses. So your foreign key is valid only for the root class that it directly references and not its children.

cheers,
thalis

ps check list archives, same question answered last week

On Sun, 24 Jun 2001, Micah Yoder wrote:

> Hi,
>
> I [think I] found a bug, and tried to send a report to pgsql-bugs and it
> never showed up there.
>
> The *very brief* version:
>
> I have a hierarchy of tables using Postgres's inheritance feature. In the
> root table I have a serial type which is a primary key. Another table (not
> in the hierarchy) has a foreign key to the primary key of the top table in
> the hierarchy.
>
> When I insert a record with a foreign key that references an object in a
> descendent table, I get a referential integrity error. But when it
> references an item that is simply a member of the top class, no problem - the
> foreign key works then.
>
> If I select * from the top class, both records show up, along with their id
> primary key. So why can't a foreign key refer to the one that is a member of
> a subclass?
>
> I'm using 7.1.2
>
> Thanks,
> Micah
>
> --
> Like to travel? http://TravTalk.org
> Micah Yoder Internet Development http://yoderdev.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>

In response to

  • Bug list? at 2001-06-24 04:57:48 from Micah Yoder

Browse pgsql-general by date

  From Date Subject
Next Message David Wheeler 2001-06-25 15:57:17 Re: More Red Hat information
Previous Message Peter Eisentraut 2001-06-25 15:22:36 Re: What's it: NOTICE: Adding missing FROM-clause entry