Re: self referenced table ?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: self referenced table ?
Дата
Msg-id 20040319065834.P75424@megazone.bigpanda.com
обсуждение исходный текст
Ответ на self referenced table ?  (BRINER Cedric <work@infomaniak.ch>)
Список pgsql-general
On Fri, 19 Mar 2004, BRINER Cedric wrote:

> CREATE TABLE test (key1 int, key2 int , primary key (key1,key2), parent
>   <?kind of data type?> constraint parent references test  );

Foreign keys must reference a unique value.  If the only uniqueness
constraint is (key1, key2) as above, then it requires two columns to do
the constraint (one holding the referenced key1 value, one holdign the
referenced key2 value) and a table level foreign key constraint or you
need something like a serial key added to the table.

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

Предыдущее
От: Pierre Didelon
Дата:
Сообщение: unsigned types, binary op. and cast pb
Следующее
От: Carmen Gloria Sepulveda Dedes
Дата:
Сообщение: 7.4.2 on Solaris 9 - Error