Re: Does a 'stable' deferred trigger execution order exist?

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
Subject: Re: Does a 'stable' deferred trigger execution order exist?
Date: 2004-08-16 20:30:42
Message-ID: 41211972.1080802@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank van Vugt wrote:

>>>If during a transaction a number of deferred triggers are fired, what
>>>will be their execution order upon the commit?
>
>
>>Should be alphabetical within each triggering event, IIRC.
>
>
> Mmm, yes, but are all the deferred triggers on the same event 'grouped'?
>
> What I'm thinking about is something like:
>
>
> BEGIN;
> update foo1; => triggers deferred after insert trigger 'Z'
> select bar;
> update foo2; => triggers deferred after insert triggers 'B' and 'A'
> COMMIT;
>
>
> Now, will I see an execution order of 'Z-A-B' (on alfabet per event per
> statement) or 'A-B-Z' (on alfabet per event per transaction)??
>
> For what I want to accomplish, I don't care about the order of A/B, but
> together they depend on the work that is done by the earlier triggered Z.

The best way is to "raise notice" inside the trigger function and observe
the results

Regards
Gaetano Mendola

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manuel Sugawara 2004-08-16 20:53:16 Re: PostgreSQL 8.0 Feature List?
Previous Message Gaetano Mendola 2004-08-16 20:05:06 Re: Thousands of parallel connections