From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | acroyear(at)bigpanda(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] foreign keys? |
Date: | 2000-01-23 15:35:59 |
Message-ID: | 3.0.1.32.20000123073559.0105c3f0@mail.pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 03:17 AM 1/23/00 -0500, acroyear(at)bigpanda(dot)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(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-01-23 16:12:09 | Re: [HACKERS] column aliases |
Previous Message | Don Baccus | 2000-01-23 15:26:58 | Re: [HACKERS] Happy column dropping |