Re: Why are triggers semi-deferred?
От | Philip Warner |
---|---|
Тема | Re: Why are triggers semi-deferred? |
Дата | |
Msg-id | 5.1.0.14.0.20030506021859.04272620@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | Re: Why are triggers semi-deferred? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Why are triggers semi-deferred?
|
Список | pgsql-hackers |
At 12:07 PM 5/05/2003 -0400, Tom Lane wrote: >Wouldn't you want to wait till end of statement so you >know that the whole statement is in fact going to complete (and not >die at some later row)? So you are suggesting: Procedure Starts Statement A executes: Before Row 1 Update Row 1 Before Row 2 UpdateRow 2 After Row 1 After Row 2 Statement Trigger for A Statement B executes: Before Row1 Update Row 1 Before Row 2 Update Row 2 After Row 1 After Row 2 StatementTrigger for B Procedure Ends This seems like a nice optimization, but probably disagrees with the spec since we would be deferring the triggerred action (slightly). From a users point of view, I would be happy with it, and even prefer it to my interpretation of the spec. But in the case of multi-row updates, won't it be expensive to keep all the context? ---------------------------------------------------------------- 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 по дате отправления: