Re: Array of foreign key

Поиск
Список
Период
Сортировка
От Ken Tanzer
Тема Re: Array of foreign key
Дата
Msg-id CAD3a31VzLD9oTf4fewSh2-gHW=cQB7D55KUxTkC1UVKdY274OQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Array of foreign key  (Melvin Davidson <melvin6925@gmail.com>)
Ответы Re: Array of foreign key  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general

I don't think you understand how Foreign Key constraints work in PostgreSQL.
PostgreSQL will prevent any insert where the value of a column is not within the FK table.
So you DO NOT need a check constraint or trigger.


I thought the OP was asking for this feature ("Support for Array ELEMENT Foreign Keys"):


which would be super-handy, but doesn't actually exist.  You can enforce it yourself with a trigger on both tables, but I still hope this someday gets included into Postgres!

Ken

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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: Array of foreign key
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Re: Deadlock between concurrent index builds on different tables