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

From Tom Lane
Subject Re: Triggers and System Tables
Date
Msg-id 11916.1018965558@sss.pgh.pa.us
Whole thread Raw
In response to Triggers and System Tables  (Hans-Juergen Schoenig <hs@cybertec.at>)
List pgsql-general
Hans-Juergen Schoenig <hs@cybertec.at> writes:
> I have a brief question concerning triggers and system tables:
> Why is it not allowed to trigger a system table?

Most of the operations that modify system tables don't bother to fire
triggers ... so if you had a trigger, it would generally fail to capture
the interesting events.  I'm not sure what the feasibility would be of
firing triggers everywhere that system tables are updated.  Offhand I'd
be worried about whether the system is in a sufficiently self-consistent
state to support trigger execution at all those points.

It would probably also be a *really bad* idea to install a trigger that
tries to alter the row or suppress the update ;-)

            regards, tom lane

pgsql-general by date:

Previous
From: Maurice Balick
Date:
Subject: Re: index problem (uses one index but not the other)
Next
From: Maurice Balick
Date:
Subject: Re: index problem (uses one index but not the other)