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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to