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

From Jan Wieck
Subject Re: Triggers and System Tables
Date
Msg-id 200204161559.g3GFxUB11548@saturn.janwieck.net
Whole thread Raw
In response to Triggers and System Tables  (Hans-Juergen Schoenig <hs@cybertec.at>)
List pgsql-general
Hans-Juergen Schoenig wrote:
> I have a brief question concerning triggers and system tables:
> Why is it not allowed to trigger a system table? I guess it could be
> useful from time to time.

    Because  system  tables  are  often  modified  by direct heap
    access, rather than regular query plans handled  through  the
    executor. The direct heap access doesn't invoke the triggers.

    Even if we get this problem "fixed" (I don't really  consider
    it  broken),  what if you setup a ON UPDATE OR DELETE trigger
    for pg_proc, that is broken? You cannot remove or fix it  any
    more,  so  your  pg_proc  system  catalog is frozen, forever,
    irreversable, infinitely! That's bad!


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-general by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: Large table update/vacuum PLEASE HELP!
Next
From: Neil Conway
Date:
Subject: Re: function for creating random id