Re: [GENERAL] Insert with query

2013-06-01 Thread Adrian Klaver
On 06/01/2013 09:22 AM, Kevin Grittner wrote: Adrian Klaver wrote: On 06/01/2013 06:47 AM, Kevin Grittner wrote: Currently on an AFTER ... FOR EACH ROW we fire the trigger once *for* each affected row, that's true. But we don't do it immediately after the *triggering event* -- we do it imme

Re: [GENERAL] Insert with query

2013-06-01 Thread Kevin Grittner
Adrian Klaver wrote: > On 06/01/2013 06:47 AM, Kevin Grittner wrote: >> Currently on an AFTER ... FOR EACH ROW we fire the trigger once >> *for* each affected row, that's true.  But we don't do it >> immediately after the *triggering event* -- we do it immediately >> after the *data change statem

Re: [GENERAL] Insert with query

2013-06-01 Thread Adrian Klaver
On 06/01/2013 06:47 AM, Kevin Grittner wrote: Adrian Klaver wrote: On 05/31/2013 08:15 AM, Kevin Grittner wrote: Adrian Klaver wrote: On 05/31/2013 06:32 AM, Kevin Grittner wrote: But why? The OP specified FOR EACH ROW in the trigger statement. The thing is I thought it was working

Re: [GENERAL] Insert with query

2013-06-01 Thread Kevin Grittner
Adrian Klaver wrote: > On 05/31/2013 08:15 AM, Kevin Grittner wrote: >> Adrian Klaver wrote: >>> On 05/31/2013 06:32 AM, Kevin Grittner wrote: >>> But why? The OP specified FOR EACH ROW in the trigger >>> statement. >> >> I went to the SQL spec, >> To quote [...], the trigger should fire "eithe

Re: [GENERAL] Insert with query

2013-05-31 Thread Adrian Klaver
On 05/31/2013 08:15 AM, Kevin Grittner wrote: Adrian Klaver wrote: On 05/31/2013 06:32 AM, Kevin Grittner wrote: But why? The OP specified FOR EACH ROW in the trigger statement. Hmm. I went to the SQL spec, and the behavior expected by Juliano seems to be what it mandated by the spec. To

Re: [GENERAL] Insert with query

2013-05-31 Thread Kevin Grittner
Adrian Klaver wrote: > On 05/31/2013 06:32 AM, Kevin Grittner wrote: >> Juliano Amaral Chaves wrote: >> >>> By doing insert into a table using a query, it seems that all >>> records of consultation were included bypassing the AFTER INSERT >>> triggers and as few as after all the records already i

Re: [GENERAL] Insert with query

2013-05-31 Thread Adrian Klaver
On 05/31/2013 06:32 AM, Kevin Grittner wrote: Juliano Amaral Chaves wrote: By doing insert into a table using a query, it seems that all records of consultation were included bypassing the AFTER INSERT triggers and as few as after all the records already included, the TRIGGER is fired for each

Re: [GENERAL] Insert with query

2013-05-31 Thread Kevin Grittner
Juliano Amaral Chaves wrote: > By doing insert into a table using a query, it seems that all > records of consultation were included bypassing the AFTER INSERT > triggers and as few as after all the records already included, > the TRIGGER is fired for each record, I wonder if this occurrence > is

[GENERAL] Insert with query

2013-05-24 Thread Juliano Amaral Chaves
By doing insert into a table using a query, it seems that all records of consultation were included bypassing the AFTER INSERT triggers and as few as after all the records already included, the TRIGGER is fired for each record, I wonder if this occurrence is normal. I created an example that dem