Re: Commit turns into rollback? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Commit turns into rollback?
Date
Msg-id 28921.1142608900@sss.pgh.pa.us
Whole thread Raw
In response to Re: Commit turns into rollback?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Commit turns into rollback?  ("Marko Kreen" <markokr@gmail.com>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Freitag, 17. M�rz 2006 16:07 schrieb Tom Lane:
>> It would also move us further away from the SQL standard.  The spec says
>> that COMMIT ends the transaction, full stop, not "ends it only if you're
>> not in an error state".  Of course the spec hasn't got a notion of a
>> transaction error state at all, but my point is that making COMMIT leave
>> you in the broken transaction is not an improvement compliance-wise.

> The standard does address the issue of transactions that cannot be committed 
> because of an error.  In 16.6. <commit statement> GR 6 it basically says that
> if the transaction cannot be completed (here: because of a constraint 
> violation), then an exception condition should be raised.  That is, the 
> transaction is over but you get an error.  I think that behavior would be 
> better.

So it's not the fact that it rolls back that bugs you, it's the way that
the action is reported?  We could talk about changing that maybe --- it
wouldn't break existing scripts AFAICS.  It might break applications
though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Commit turns into rollback?
Next
From: "Marko Kreen"
Date:
Subject: Re: Commit turns into rollback?