Re: Review: pre-commit triggers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Review: pre-commit triggers
Date
Msg-id 10592.1384879104@sss.pgh.pa.us
Whole thread Raw
In response to Re: Review: pre-commit triggers  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Review: pre-commit triggers  (Ian Lawrence Barwick <barwick@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Nov 18, 2013 at 9:39 AM, Ian Lawrence Barwick <barwick@gmail.com> wrote:
>> I'd expect this to lead to a failed transaction block,
>> or at least some sort of notice that the transaction itself
>> has been rolled back.

> Ending up in a failed transaction block would be wrong.  If the user
> does a BEGIN, a bunch of stuff, and a COMMIT, they're entitled to
> assume without checking that they are no longer in a transaction
> block.

Absolutely.  There are plenty of ways to fail at COMMIT already,
eg deferred foreign key constraints.  This shouldn't act any
different.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Next
From: Andres Freund
Date:
Subject: Re: better atomics - v0.2