Re: Why are triggers semi-deferred?
От | Philip Warner |
---|---|
Тема | Re: Why are triggers semi-deferred? |
Дата | |
Msg-id | 5.1.0.14.0.20030506012322.0552fe80@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | Re: Why are triggers semi-deferred? (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
Ответы |
Re: Why are triggers semi-deferred?
|
Список | pgsql-hackers |
At 08:20 AM 5/05/2003 -0700, Stephan Szabo wrote: >Actually, I think from sql99's description, for after row triggers it >should happen after the row is modified not after the statement as a >whole (so given two 2 row updates in a function you'd get > update1,row1 afterrow1-1 update1,row2 afterrow1-2,afterstatement1 > update2,row1 afterrow2-1 update2,row2 afterrow2-2,afterstatement2 >) Totally agree (I think) -- I am not sure how to interpret your example. To (I hope) clarify: if a function has two update statements (A & B), each of which update two rows (1 & 2), I would expect the triggers to fire as: Procedure Starts Statement A executes: Before Row 1 After Row 1 Before Row 2 After Row 2 Statement Trigger for A Statement B executes: Before Row 1 After Row 1 Before Row 2 After Row 2 Statement Trigger for B Procedure Ends At the current time in 7.3, we have: Procedure Starts Statement A executes: Before Row 1 Before Row 2 Statement B executes: BeforeRow 1 Before Row 2 Procedure End After Row 1 After Row 2 After Row 1 After Row 2 ...which seems weird to me. Is this something that needs fixing in 7.3.3? ---------------------------------------------------------------- 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 |/
В списке pgsql-hackers по дате отправления: