Re: Rollback on Error - Mailing list pgsql-general

From Michael Paesold
Subject Re: Rollback on Error
Date
Msg-id 005301c49a43$2a6eb040$ad01a8c0@zaphod
Whole thread Raw
In response to Rollback on Error  ("Michael Paesold" <mpaesold@gmx.at>)
List pgsql-general
Peter Eisentraut wrote:

> Michael Paesold wrote:
> > I though the postgres behaviour of rolling back the whole transaction
> > was standard?
>
> No.

Thanks for putting that straigt.

> > If that is not the case, I don't understand why core
> > seems to be against a mode (GUC), where an implicit savepoint is
> > generated before each statement so that "rollback of the last
> > statement" would be possible.
>
> Because it's dangerous in noninteractive mode.  When you send a
> transaction to the server, you don't want some statements be left out.


I understand it's dangerous, it would possibly introduce data-inconsistency
in all applications that don't check for errors after each statement...

Still it would be very useful in interactive psql...
of course, it's bad in scripted mode. Perhaps it could be implemented inside
psql? Would such a patch be accepted?

Regards,
Michael Paesold


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Rollback on Error
Next
From: Csaba Nagy
Date:
Subject: Re: Rollback on Error