X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BBBAED1B20D for ; Thu, 17 Jun 2004 18:19:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88555-08 for ; Thu, 17 Jun 2004 21:19:27 +0000 (GMT) Received: from cmailg3.svr.pol.co.uk (cmailg3.svr.pol.co.uk [195.92.195.173]) by svr1.postgresql.org (Postfix) with ESMTP id E3D4AD1B193 for ; Thu, 17 Jun 2004 18:19:23 -0300 (ADT) Received: from modem-1629.monkey.dialup.pol.co.uk ([217.135.214.93] helo=[192.168.0.100]) by cmailg3.svr.pol.co.uk with esmtp (Exim 4.14) id 1Bb4I8-0005pU-Pr; Thu, 17 Jun 2004 22:19:25 +0100 Subject: Re: Nested transactions From: Simon Riggs To: Alvaro Herrera Cc: Patches In-Reply-To: <20040617014359.GA5925@dcc.uchile.cl> References: <20040608222356.GC13820@dcc.uchile.cl> <1087425935.12015.1154.camel@stromboli> <20040617014359.GA5925@dcc.uchile.cl> Content-Type: text/plain Organization: 2nd Quadrant Message-Id: <1087507163.12015.5100.camel@stromboli> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Thu, 17 Jun 2004 22:19:24 +0100 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200406/231 X-Sequence-Number: 11454 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