Re: feature requests (possibly interested in working on this): functional foreign keys

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: feature requests (possibly interested in working on this): functional foreign keys
Дата
Msg-id CAEzk6feEQGp3SkJhAbzQxf1u_S6e-tS8uY+q_=Cap0wX+nmLYQ@mail.gmail.com
обсуждение исходный текст
Ответ на feature requests (possibly interested in working on this): functional foreign keys  (Chris Travers <chris.travers@gmail.com>)
Ответы Re: feature requests (possibly interested in working on this): functional foreign keys  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
On 7 February 2013 09:38, Chris Travers <chris.travers@gmail.com> wrote:

> 1:  The foreign key depends on the function so the function cannot be
> dropped first absent CASCADE
>
> 2: If the function is redefined, one would have to check all rows to
> verify that they meet the new function's requirements.  This could pose a
> performance issue with DDL.
>
> There are obvious workarounds.  One could use a trigger and a foreign key.
>
> But my questions are:
>
> 1.  Is there enough use in something like this to even try to tackle it?
>
> 2.  Are there any other major showstoppers I haven't thought of?
>
> Purely from a user perspective IMO it seems like a good idea and a logical
progression from index expressions. You could even make use of the
equivalent index expression if it existed, or (better) insist on it,
because the calculated value would have to be UNIQUE anyway (otherwise you
end up in all sorts of trouble).

Geoff

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

Предыдущее
От: Alexander Farber
Дата:
Сообщение: Re: "explain analyze" a procedure verbosely - to find which statement in it takes longer
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: DEFERRABLE NOT NULL constraint