Re: Autocommit off - commits/rollbacks

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Autocommit off - commits/rollbacks
Date: 2011-03-14 16:29:01
Message-ID: 20110314162901.GA60150@shinkuro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 14, 2011 at 03:55:37PM +0100, Vogt, Michael wrote:
> Why does postgres rollback the whole transaction after an error? I
> compared the behavior with oracle/hsql - those dbms commit whats
> possible.

A transaction is supposed to commit or rollback. If you want to hold
on to something that you've done and then try something (and pursue
alternatives depending on whether you get an error), use a savepoint.
See
http://www.postgresql.org/docs/9.0/interactive/tutorial-transactions.html

A

--
Andrew Sullivan
ajs(at)crankycanuck(dot)ca

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Viktor Nagy 2011-03-14 16:40:47 Re: Values larger than 1/3 of a buffer page cannot be indexed.
Previous Message Joshua D. Drake 2011-03-14 16:28:15 Re: Primary key