Re: [HACKERS] foreign keys?

Поиск
Список
Период
Сортировка
От acroyear@bigpanda.com
Тема Re: [HACKERS] foreign keys?
Дата
Msg-id 200001230817.DAA19404@homeworld.bigpanda.org
обсуждение исходный текст
Ответ на foreign keys?  (Don Baccus <dhogaza@pacifier.com>)
Ответы Re: [HACKERS] foreign keys?  (Don Baccus <dhogaza@pacifier.com>)
Список 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).


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] char_length()?
Следующее
От: Constantin Teodorescu
Дата:
Сообщение: Unique constraint for inherited tables?