Re: System Tables and Triggers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: System Tables and Triggers
Date
Msg-id 18602.1046627016@sss.pgh.pa.us
Whole thread Raw
In response to System Tables and Triggers  (Stef Telford <stef@chronozon.artofdns.com>)
List pgsql-hackers
Stef Telford <stef@chronozon.artofdns.com> writes:
>     This would seem to be a step backwards to me though, as
> now we cant even put triggers on the system tables. Is there any
> chance of this being lifted ?

Not unless you can explain to us how it can be safe to fire arbitrary
user-defined code when the system tables are in inconsistent
intermediate states.  Few commands change only one row of only one
catalog.

It may be (I haven't thought about it too hard) that it would be safe to
allow AFTER triggers on some tables.  But implementing it --- that is,
actually getting the triggers to be executed --- would be a lot of work.
And I'm afraid of the potential for nasty problems if such a trigger
raises an error or recursively invokes other catalog updates.

Bottom line is that this would be a large, difficult project with
(IMHO) relatively low return.  It may get done someday, but don't
hold your breath.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Itai Zukerman
Date:
Subject: Re: GiST: Bad newtup On Exit From gistSplit() ?
Next
From: Tom Lane
Date:
Subject: Re: GiST: Bad newtup On Exit From gistSplit() ?