Skip site navigation (1) Skip section navigation (2)

Re: Nested transactions

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Nested transactions
Date: 2004-06-17 21:19:24
Message-ID: 1087507163.12015.5100.camel@stromboli (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-patches
On Thu, 2004-06-17 at 02:44, Alvaro Herrera wrote:
> I don't know what Oracle or other DBMSs expect in this area.  Anyone
> care to give me a few pointers?  If I'm missing something, I want to
> know as soon as possible.

Without ignoring your other responses, I remain massively impressed....

SAVEPOINTs allow you to split a transaction into multiple related parts.

You can issue:
(implicit start)
statement1
statement2
statement3 - causes error - note does not rollback txn
reissue statement3
SAVEPOINT X
statement 4 - succeeds
ROLLBACK to X (undoes statement 4, but not statement 3)
statement 5
COMMIT

statements 1,2,3,5 are committed


Best Regards, Simon Riggs



In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-06-17 22:01:49
Subject: Re: Nested transactions
Previous:From: Bruce MomjianDate: 2004-06-17 18:18:18
Subject: Tablespace patch review

pgsql-jdbc by date

Next:From: Nancy MrozDate: 2004-06-17 21:27:56
Subject: jar file with 7.3.6 postgresql?
Previous:From: AlbretchDate: 2004-06-17 21:08:43
Subject: Portable Java Data Layer based on JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group