Skip site navigation (1) Skip section navigation (2)


From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Andreas Pflug <Andreas(dot)Pflug(at)web(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, NeilC(at)samurai(dot)com
Subject: Re: FOR EACH STATEMENT triggers
Date: 2003-04-29 19:30:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Andreas Pflug wrote:
> On Nov 14, Neil wrote:
>  >>I'd like to implement FOR EACH STATEMENT triggers. AFAICS it shouldn't
>  >>be too tricky -- so if there's some show-stopper that prevented it
>  >>from being done earlier, let me know now, please :-)
>  >>Some random notes on the implementation I'm thinking of:
>  >> - in the function called by a per-statement trigger, no
>  >> references to the 'OLD' or 'NEW' rows will be allowed
> It appears that statement triggers are implemented this way right now in
> CVS tip. Unfortunately, this means that there's no way to figure out the
> record set that is covered by the triggering action, which I consider
> being fundamental for a usable implementation. There should be new
> references,
> called OLDSET and NEWSET or something like that.


>  >> - should we allow per-statement BEFORE triggers? DB2 doesn't,
>  >> but I'm not sure that's because they just cut corners, or if
>  >> there's some legitimate reason not to allow them. AFAICT SQL
>  >> 200x doesn't specify that they *aren't* allowed, so I'm
>  >> inclined to allow them...
> MS SQL2000 has only AFTER STATEMENT triggers too, which seems to be
> sufficient.

Since BEFORE ROW triggers can modify or suppress the resulting changes,
there is no way to have a BEFORE STATEMENT trigger if we also want


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

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-04-29 19:34:36
Subject: Re: Transform groups
Previous:From: Bruce MomjianDate: 2003-04-29 18:26:39
Subject: Re: Cygwin PostgreSQL CVS build issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group