Re: Triggers on transaction? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Triggers on transaction?
Date
Msg-id 31402.1432736087@sss.pgh.pa.us
Whole thread Raw
In response to Re: Triggers on transaction?  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> Can't you just use deferred triggers?

That seems like the real $64 question.

> I'm not clear exactly when such a trigger should run. If the trigger issues
> more SQL, which also has triggers... do we run the PreCommit trigger twice?
> Or just accept that we wanted it to run just prior to commit but it kinda
> didn't?

Yeah.  By the time you get rid of the logical inconsistencies in the
concept of a trigger that runs "at commit", it seems like you end up with
something not so different from the existing deferred-trigger facility.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
Next
From: Simon Riggs
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.