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

Re: references fail over rows inserted via inherited tables

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: references fail over rows inserted via inherited tables
Date: 2001-05-21 00:06:32
Message-ID: Pine.BSF.4.21.0105201657020.54871-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Sun, 20 May 2001 pgsql-bugs(at)postgresql(dot)org wrote:

> Diego Saravia (dsa(at)unsa(dot)edu(dot)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.


In response to

pgsql-bugs by date

Next:From: karthikeyan VDate: 2001-05-21 07:09:37
Subject: pg_dumpall in post
Previous:From: pgsql-bugsDate: 2001-05-20 23:38:31
Subject: references fail over rows inserted via inherited tables

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