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 9BE973A3CF3 for ; Tue, 9 Nov 2004 16:25:11 +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 78426-03 for ; Tue, 9 Nov 2004 16:24:56 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 994A33A3C79 for ; Tue, 9 Nov 2004 16:24:54 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id iA9GOrJ7078525 for ; Tue, 9 Nov 2004 16:24:53 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id iA9GKCfo076813 for pgsql-sql@postgresql.org; Tue, 9 Nov 2004 16:20:12 GMT From: Bricklen User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: Re: A transaction in transaction? Possible? References: <014301c4c638$b33af430$0b00a8c0@forge> In-Reply-To: <014301c4c638$b33af430$0b00a8c0@forge> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 23 Message-ID: <%66kd.134544$df2.123001@edtnps89> Date: Tue, 09 Nov 2004 16:20:11 GMT To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=NO_DNS_FOR_FROM X-Spam-Level: * X-Archive-Number: 200411/128 X-Sequence-Number: 19447 Andrei Bintintan wrote: > //Is it possible to have another transatction in a transaction??? In the > following example the last ROLLBACK is totally ignored(transaction1). > > ///connect to database/ > $database = dbConnect($dbhost, $dbuser, $dbpass, $dbname); > dbExec($database, "BEGIN"); //transaction1 > > ///*/ > / / dbExec($database, "BEGIN");//transaction2 > $sql = "UPDATE orders SET technikernotiz='51' WHERE id=16143"; > dbExec($database, $sql); > dbExec($database, "COMMIT");//transaction2 > //**/ > / > $sql = "UPDATE orders SET reklamationsdetail='51' WHERE id=16143"; > dbExec($database, $sql); > dbExec($database, "ROLLBACK");//transaction1 > > dbClose($database); > > This appears to be the same as Oracle's "autonomous transactions", fwiw.