Re: Proposed feature: Selective Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Dunstan
Тема Re: Proposed feature: Selective Foreign Keys
Дата
Msg-id 38553C89-B8B3-410E-90F1-F563DEC3D249@tomd.cc
обсуждение исходный текст
Ответ на Re: Proposed feature: Selective Foreign Keys  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 3 Dec 2013, at 01:34, Andrew Dunstan <andrew@dunslane.net> wrote:

> We wanted to apply FK constraints to a very large table, but grandfather in certain cases that didn't meet the
constraint.That could have been done very simply using this feature. 

Yeah, references to old data is the other obvious case for conditionally turning foreign keys off. I decided against
usingit as an example when trying to sell the feature as there are much easier workarounds than in the different-parent
case,and as a solution it really is a bit more ugly. But I suspect that it’s one that people have to deal with fairly
regularly.

It might encourage people to keep e.g. old ids in the same column when they should be putting them in a separate one,
butthen sometimes you don’t get to just rewrite the schema as there are legacy systems etc etc. 

Cheers

Tom


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Trust intermediate CA for client certificates
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Trust intermediate CA for client certificates