pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
trigger firing order
3+ messages / 2 participants
[nested] [flat]

* trigger firing order
@ 2007-06-16 02:08  chester c young <chestercyoung@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: chester c young @ 2007-06-16 02:08 UTC (permalink / raw)
  To: pgsql-sql

tables A and B: a post row trigger on A cause updates on B which has
its own post row trigger.

does the post trigger on A wait until post trigger on B is executed? -
this seems intuitive to me.

does the post trigger on B wait until the trigger on A has completed?

or is post trigger A launched as its own process (in which case who
completes first is indeterminate).

or am I missing this entirely?

pre-row thanks for your insight!




      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: trigger firing order
@ 2007-06-16 03:03  Gregory Stark <stark@enterprisedb.com>
  parent: chester c young <chestercyoung@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Gregory Stark @ 2007-06-16 03:03 UTC (permalink / raw)
  To: chester c young <chestercyoung@yahoo.com>; +Cc: pgsql-sql

"chester c young" <chestercyoung@yahoo.com> writes:

> tables A and B: a post row trigger on A cause updates on B which has
> its own post row trigger.
>
> does the post trigger on A wait until post trigger on B is executed? -
> this seems intuitive to me.

How can it wait until the trigger on B is executed if the trigger on B doesn't
actually get triggered until someone updates B and it's the trigger on A
doing the update?

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: trigger firing order
@ 2007-06-16 05:43  chester c young <chestercyoung@yahoo.com>
  parent: Gregory Stark <stark@enterprisedb.com>
  0 siblings, 0 replies; 3+ messages in thread

From: chester c young @ 2007-06-16 05:43 UTC (permalink / raw)
  To: Gregory Stark <stark@enterprisedb.com>; +Cc: pgsql-sql


> > does the post trigger on A wait until post trigger on B is
> executed? -> > this seems intuitive to me.
> 
> How can it wait until the trigger on B is executed if the trigger on
> B doesn't
> actually get triggered until someone updates B and it's the trigger
> on A
> doing the update?

trigger A executes until it updates table B, at which point it does it
pause execution until the post update trigger on table B completes, and
then trigger A resumes at the next statement.



       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-06-16 05:43 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-06-16 02:08 trigger firing order chester c young <chestercyoung@yahoo.com>
2007-06-16 03:03 ` Gregory Stark <stark@enterprisedb.com>
2007-06-16 05:43   ` chester c young <chestercyoung@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox