At least in 7.3, triggered actions specified as AFTER seem to be deferred
to the completion of the outer-most SQL statement. So, if two triggering
statements are executed as part of a PLPGSQL procedure, they will not be
executed until the outermost statement finishes.
As far as I can tell, this is not the way the spec says it should work:
The <triggered SQL statement> of a triggered action is effectively executed either immediately before or
immediately after the trigger event, as determined by the specified trigger action time.
In the case of statements executed sequentially inside a PLPGSQL procedure,
I would have expected that the trigger would fire after the first
triggering statement.
Have I missed a discussion of this (I have looked), or is this just a known
problem?
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/