Re: Proposed feature: Selective Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Dunstan
Тема Re: Proposed feature: Selective Foreign Keys
Дата
Msg-id 805981F6-F25E-4E80-8280-D7A0A7CC6D28@tomd.cc
обсуждение исходный текст
Ответ на Re: Proposed feature: Selective Foreign Keys  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 5 Dec 2013, at 03:48, Andrew Dunstan <andrew@dunslane.net> wrote:
>>> Well I guess we could say something like:
>>>
>>>    FOREIGN KEY (a-col) WHERE (a-condition) REFERENCES b(b-col) WHERE
>>>    (b-condition)
>>>
>
> OK, those make sense. I wonder whether this should be done via a USING clause on the constraint that pointed to the
partialunique index. Or would that be too obscure? 

Well you could put a USING clause on the end and it would read pretty unambiguously. Requiring that the user specify it
ratherthan trying to guess which index to use would also probably be an easier path to getting that feature in, at
leastfor a first cut. 

I won’t be doing work towards putting a where clause on the referenced side just yet, though. One thing at a time.

Cheers

Tom






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

Предыдущее
От: Tom Dunstan
Дата:
Сообщение: Re: Proposed feature: Selective Foreign Keys
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Performance optimization of btree binary search