Re: Pg7.4.x plpgsql trigger execution order bug - Mailing list pgsql-general

From Tom Lane
Subject Re: Pg7.4.x plpgsql trigger execution order bug
Date
Msg-id 20928.1183008365@sss.pgh.pa.us
Whole thread Raw
In response to Pg7.4.x plpgsql trigger execution order bug  ("Luki Rustianto" <lukirus@gmail.com>)
List pgsql-general
"Luki Rustianto" <lukirus@gmail.com> writes:
> I've found on pg7.4.x that plpgsql trigger will not wait for finishing
> one line of command before executing to the next line, specially if
> that command is firing another trigger on another table. This is very
> wrong on my point of view. This only happen on pg7.

To quote the 8.0 release notes:

: Observe the following incompatibilities:
: ...
: Nondeferred AFTER triggers are now fired immediately after completion of
: the triggering query, rather than upon finishing the current interactive
: command. This makes a difference when the triggering query occurred
: within a function: the trigger is invoked before the function proceeds
: to its next operation.

This change is not going to be back-patched into 7.x, because it would
break applications that depended on the old behavior.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Column Default Clause and User Defined Functions
Next
From: Richard Huxton
Date:
Subject: Re: Image Archiving with postgres