X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6A0B9D1B508 for ; Tue, 11 Nov 2003 06:59:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84791-08 for ; Tue, 11 Nov 2003 02:58:42 -0400 (AST) Received: from firewall.bg.bib.de (firewall.bg.bib.de [193.22.65.34]) by svr1.postgresql.org (Postfix) with ESMTP id 6EE15D1B502 for ; Tue, 11 Nov 2003 02:58:41 -0400 (AST) Received: from [193.22.65.2] (helo=bg.bib.de) by firewall.bg.bib.de with esmtp (Exim 4.22) id 1AJSTp-0001XZ-Tz for pgsql-sql@postgresql.org; Tue, 11 Nov 2003 07:58:25 +0100 Received: from pcrc110b.bg.bib.de (hj@pcrc110b.bg.bib.de [193.22.67.141]) by bg.bib.de (8.11.3/8.8.8) with ESMTP id hAB6wFJ25120; Tue, 11 Nov 2003 07:58:16 +0100 Message-Id: <200311110658.hAB6wFJ25120@bg.bib.de> Date: Tue, 11 Nov 2003 07:57:33 +0100 (CET) From: Holger Jakobs Subject: Re: transaction processing after error in statement To: JanWieck@Yahoo.com Cc: sszabo@megazone.bigpanda.com, pgsql-sql@postgresql.org In-Reply-To: <3FAFD756.2000704@Yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Scan-Signature: 90336c3261d4ef3e2623de735339e7a2 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/125 X-Sequence-Number: 15940 > > Why is that "funny behaviour" for you? By putting the statements into > a transaction block you told the data management system "I want this > group of statements to be atomic". Atomic means all or nothing. It > might not be exactly what you intended to say, and you have a point > if you conclude that PostgreSQL is limited because it doesn't let you > say anything in between all or nothing. But after all, thus far it is > only doing what you asked for. > It is "funny behaviour", because I expect those operations of the transaction, which executed successfully, to be performed in an atomic way. It is obvious that I cannot expect an operation which reported an error to have any effect. "Atomic" means that all operations (whether successful or not) will be carried out all together or none of them - but only the successful ones will have had an effect. Again: Why not make a difference between "commit" and "rollback" in a transaction in this case? Why not let the user decide which parts should be commited? The practical reason is that programming would become a lot more convenient. (if there is a practical reason it does not necessarily need a technical reason, I believe.) Sincerely, Holger -- Holger@Jakobs.com, Bergisch Gladbach, Germany Telefon (0 22 02) 5 99 91 oder (01 77) 7 92 24 66