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

From Marko Kreen
Subject Re: Commit turns into rollback?
Date
Msg-id e51f66da0603170750x11b58ec5sda1a946b14d5ddb6@mail.gmail.com
Whole thread Raw
In response to Re: Commit turns into rollback?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 3/17/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > 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.

Error means the actual command failed.  _Doing_ something, successfully,
and still reporting error seems rather wrong.

IMHO only other behaviour than current one that is not broken
is requiring ROLLBACK for failed transactions.  And that is no good
for backwards-compatibility reasons.

So -1 for changing anything.

--
marko


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Commit turns into rollback?
Next
From: Peter Eisentraut
Date:
Subject: Seperate command-line histories for seperate databases