Re: Rollback on Error

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Rollback on Error
Date: 2004-09-14 09:53:16
Message-ID: 20040914095316.GD27693@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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(at)svana(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-09-14 09:56:42 Re: Rollback on Error
Previous Message Tim Penhey 2004-09-14 09:49:43 plpgsql - raising exceptions with open cursors

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-09-14 09:56:42 Re: Rollback on Error
Previous Message Michael Paesold 2004-09-14 09:39:32 Rollback on Error