X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CD1953A3B82 for ; Wed, 10 Nov 2004 06:26:17 +0000 (GMT) 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 19802-05 for ; Wed, 10 Nov 2004 06:26:12 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id AEE913A4112 for ; Wed, 10 Nov 2004 06:26:11 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id iAA6PDRo006502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 9 Nov 2004 23:25:15 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id iAA6PCOq054459; Tue, 9 Nov 2004 23:25:12 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id iAA6PB9s054458; Tue, 9 Nov 2004 23:25:11 -0700 (MST) (envelope-from mfuhr) Date: Tue, 9 Nov 2004 23:25:10 -0700 From: Michael Fuhr To: sad Cc: Theodore Petrosky , Andrei Bintintan , pgsql-sql@postgresql.org Subject: Re: A transaction in transaction? Possible? Message-ID: <20041110062510.GA54426@winnie.fuhr.org> References: <20041109152458.51487.qmail@web41007.mail.yahoo.com> <200411100923.02316.sad@bankir.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411100923.02316.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200411/98 X-Sequence-Number: 19417 On Wed, Nov 10, 2004 at 09:23:02AM +0300, sad wrote: > On Tuesday 09 November 2004 18:24, Theodore Petrosky wrote: > > I thought nested transactions are available in the new > > release (8) coming up. > > how to commit/rollback them ? CREATE TABLE person (id SERIAL PRIMARY KEY, name TEXT NOT NULL); BEGIN; INSERT INTO person (name) VALUES ('Tom'); SAVEPOINT foo; INSERT INTO person (name) VALUES ('Dick'); ROLLBACK TO foo; INSERT INTO person (name) VALUES ('Harry'); COMMIT; SELECT * FROM person; id | name ----+------- 1 | Tom 3 | Harry (2 rows) -- Michael Fuhr http://www.fuhr.org/~mfuhr/