Re: references fail over rows inserted via inherited tables - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: references fail over rows inserted via inherited tables
Date
Msg-id Pine.BSF.4.21.0105201657020.54871-100000@megazone23.bigpanda.com
Whole thread Raw
In response to references fail over rows inserted via inherited tables  (pgsql-bugs@postgresql.org)
List pgsql-bugs
On Sun, 20 May 2001 pgsql-bugs@postgresql.org wrote:

> Diego Saravia (dsa@unsa.edu.ar) reports a bug with a severity of 4
> The lower the number the more severe it is.
>
> Short Description
> references fail over rows inserted via inherited tables
>
> Long Description
> When you insert a row via an inherited table, with 7.1.1, you can see in the parent table.
>
> But when you try to insert a reference to that value you can't.

Yes.  Right now the constraint only references the rows actually
existing in the parent table not the hierarchy.  (See archives
of -bugs and -general for alot of message about this).

>
> create table trabajo2(
>  titulo text,
>  propietario integer references usuario                                       );
>
> /*
> ERROR:  PRIMARY KEY for referenced table "usuario" not found
>
> I think that this is also not Ok
>
> */

This is because primary keys do not currently inherit to child
tables, so there really isn't a primary key on usuario.

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: references fail over rows inserted via inherited tables
Next
From: "And. Andruikhanov"
Date:
Subject: temp table in pl/pgsql language