Re: [HACKERS] foreign keys? - Mailing list pgsql-hackers

From Don Baccus
Subject Re: [HACKERS] foreign keys?
Date
Msg-id 3.0.1.32.20000123073559.0105c3f0@mail.pacifier.com
Whole thread Raw
In response to Re: [HACKERS] foreign keys?  (acroyear@bigpanda.com)
List pgsql-hackers
At 03:17 AM 1/23/00 -0500, acroyear@bigpanda.com wrote:

>As of the last snapshot I downloaded, only MATCH FULL was 
>implemented fully and I think postgres will only be happy 
>if you specify the column list or table foo has a primary key.

I actually tried creating table foo with and without a primary
key, with no effect.

>create table bar(i integer references foo(i) match full);
>
>That seems to work, although by the way I read the spec, I'm
>not sure that it should since there is no unique constraint 
>specified on foo(i).

Good point, I wonder?  Maybe I should get my girlfriend to
snail-mail me my copy of Date, since I won't be back to Boston
until March.  

Anyway, the following works:

create table foo(i integer primary key);
create table bar(i integer references foo match full);

It finds the primary key within foo to match upon.

Thanks for the help.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: [HACKERS] Happy column dropping
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] Happy column dropping