From: | acroyear(at)bigpanda(dot)com |
---|---|
To: | Don Baccus <dhogaza(at)pacifier(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] foreign keys? |
Date: | 2000-01-23 08:17:03 |
Message-ID: | 200001230817.DAA19404@homeworld.bigpanda.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>I've built current sources on my brand new linux box,
>thought I'd try foreign key constraints since the datamodel for
>the ArsDigita Community System contains hundreds of them.
>Figured this might provide a bit of a stress test for the
>implementation.
>
>So...what's wrong with the following?
>
>donb=> create table foo(i integer);
>CREATE
>donb=> create table bar(i integer references foo);
>ERROR: FOREIGN KEY match type UNSPECIFIED not implemented yet
>donb=>
>
>This is how I'm used to doing it in Oracle. I've tried a few
>permutations, what am I missing? My copy of Date is still in
>Boston...
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.
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).
From | Date | Subject | |
---|---|---|---|
Next Message | Constantin Teodorescu | 2000-01-23 09:33:51 | Unique constraint for inherited tables? |
Previous Message | Tatsuo Ishii | 2000-01-23 08:16:35 | Re: [HACKERS] char_length()? |