Re: Creating foreign key constraint to child table? - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Creating foreign key constraint to child table?
Date
Msg-id Pine.BSF.4.21.0108051218300.25692-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Creating foreign key constraint to child table?  (Allan Engelhardt <allane@cybaea.com>)
List pgsql-sql
On Sun, 5 Aug 2001, Allan Engelhardt wrote:

>     test=# create table baz(bar integer, constraint fk_bar foreign key (bar) references foo(id));
>     NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
>     CREATE
> 
> but this is not exactly what I want: I need to ensure that baz.bar is
> a bar and not just any foo.
> 

Not that this is related to what you asked about precisely (I saw the
response you made), but the query above also doesn't do what you think
it does right now.  It currently makes a reference to only foo, not
any subchildren of foo.




pgsql-sql by date:

Previous
From: Allan Engelhardt
Date:
Subject: Re: Creating foreign key constraint to child table?
Next
From: Allan Engelhardt
Date:
Subject: Re: Creating foreign key constraint to child table?