Re: STABLE functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: STABLE functions
Date: 2006-10-12 14:34:30
Message-ID: 10240.1160663670@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2006-10-12 14:40:32 Re: exploiting features of pg to obtain polymorphism
Previous Message Alban Hertroys 2006-10-12 14:25:31 Re: Can a function determine whether a primary key constraint