From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Why are triggers semi-deferred? |
Date: | 2003-05-05 05:30:23 |
Message-ID: | 5.1.0.14.0.20030505151940.047fc048@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-05-05 13:45:04 | Re: pg_dump future problem. |
Previous Message | Philip Warner | 2003-05-05 05:00:12 | Re: pg_dump future problem. |