Re: Proposed feature: Selective Foreign Key

Поиск
Список
Период
Сортировка
От Niels Hoogeveen
Тема Re: Proposed feature: Selective Foreign Key
Дата
Msg-id DUB129-W34221F5F82B943EEDDD9718B720@phx.gbl
обсуждение исходный текст
Список pgsql-hackers
On 11/28/2013 09:15 AM, Tom Dunstan wrote: 
> Feature Proposal: Selective foreign keys. 
> ------------------------------------------------- 
> Allow foreign keys to have where clauses. 

I like this feature. One of the issues I have been trying to deal with is how to model countries and their subdivision. One table can suffice to register all countries, but the subdivisions of countries can have different columns and constraints. Having a where clause in a foreign key constraint would make it possible to have a table for state_us which can only contain rows referring the to USA and a table for departement_fr which can only contain rows referring to France.

I hope this feature somehow gets it into a release some day.

Niels

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Portability issues in shm_mq
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: jsonb and nested hstore