Re: Proposed feature: Selective Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposed feature: Selective Foreign Keys
Дата
Msg-id 23526.1386186002@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposed feature: Selective Foreign Keys  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Proposed feature: Selective Foreign Keys
Re: Proposed feature: Selective Foreign Keys
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
>>> Well I guess we could say something like:
>>> 
>>> FOREIGN KEY (a-col) WHERE (a-condition) REFERENCES b(b-col) WHERE
>>> (b-condition)
>>> 
>>> But it's somewhat ugly.

> OK, those make sense. I wonder whether this should be done via a USING 
> clause on the constraint that pointed to the partial unique index. Or 
> would that be too obscure?

I like what you have above.  Yeah, it requires the more verbose syntax
for declaring a foreign key, but this feature is not going to be so
heavily used that anyone will be in danger of worsening their carpal
tunnel syndrome.
        regards, tom lane



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Status of FDW pushdowns
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Why we are going to have to go DirectIO