Re: STABLE functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: STABLE functions
Дата
Msg-id 10240.1160663670@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: STABLE functions  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: STABLE functions  (Andrew Sullivan <ajs@crankycanuck.ca>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Wed, Oct 11, 2006 at 08:56:23PM +0200, Rafal Pietrak wrote:
>> Are there any plans for anything like that (referencing keys in system
>> tables from public schemas)?

> Not really. The primary objection is that every lookup in the backend
> on the system catalogs (of which there are many) would have to be
> modified to check for triggers. This would be bad for performence
> against a handful of cases where it would be useful.

There are also some interesting issues of circularity --- eg, you will
never be able to have triggers on pg_proc or pg_trigger, because that
would create an infinite recursion in relcache load.  Not to mention
risks such as a broken trigger on pg_trigger keeping you from removing
it...

It's possible that we could support AFTER triggers on certain non-core
catalogs.  I can only recall people ever asking for this feature in
connection with the user/group catalogs, so covering those might be
enough in practice; that'd certainly be lots less invasive than trying
to make it work everywhere.

            regards, tom lane

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Can a function determine whether a primary key constraint
Следующее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: exploiting features of pg to obtain polymorphism