pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Alvaro Herrera <alvherre@dcc.uchile.cl>
Cc: Patches <pgsql-patches@postgresql.org>
Subject: Re: Nested transactions
Date: Thu, 17 Jun 2004 22:19:24 +0100
Message-ID: <1087507163.12015.5100.camel@stromboli> (raw)
In-Reply-To: <20040617014359.GA5925@dcc.uchile.cl>
References: <20040608222356.GC13820@dcc.uchile.cl>
	<1087425935.12015.1154.camel@stromboli>
	<20040617014359.GA5925@dcc.uchile.cl>

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





view thread (19+ messages)  latest in thread

Message-ID: <1087507163.12015.5100.camel@stromboli>
Permalink:  ../1087507163.12015.5100.camel@stromboli/
Also on:    postgresql.org/message-id/1087507163.12015.5100.camel@stromboli

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: simon@2ndquadrant.com, alvherre@dcc.uchile.cl, pgsql-patches@postgresql.org
  Subject: Re: Nested transactions
  In-Reply-To: <1087507163.12015.5100.camel@stromboli>
  References: <20040608222356.GC13820@dcc.uchile.cl> <1087425935.12015.1154.camel@stromboli> <20040617014359.GA5925@dcc.uchile.cl> <1087507163.12015.5100.camel@stromboli>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox