Re: Rollback on Error - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Rollback on Error
Date
Msg-id 20040914095316.GD27693@svana.org
Whole thread Raw
In response to Rollback on Error  ("Michael Paesold" <mpaesold@gmx.at>)
List pgsql-general
On Tue, Sep 14, 2004 at 11:39:32AM +0200, Michael Paesold wrote:
> I though the postgres behaviour of rolling back the whole transaction was
> standard? 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.

Well. If such a mode ever becomes available I'll be looking into how to
make sure it never gets turned on. My mind is currently boggling at the
number of things it would break.

A transaction is either committed as a whole, without errors, or not at
all. If you want to do a savepoint after each statement, go right
ahead, nothing is stopping you. I just don't think making it any kind
of default is a very good idea...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Tim Penhey
Date:
Subject: plpgsql - raising exceptions with open cursors
Next
From: Klint Gore
Date:
Subject: logging rule execution?