Re: Autocommit off - commits/rollbacks - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Autocommit off - commits/rollbacks
Date
Msg-id 20110314162901.GA60150@shinkuro.com
Whole thread Raw
In response to Autocommit off - commits/rollbacks  ("Vogt, Michael" <Michael.Vogt@united-security-providers.ch>)
List 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@crankycanuck.ca

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Primary key
Next
From: Viktor Nagy
Date:
Subject: Re: Values larger than 1/3 of a buffer page cannot be indexed.