Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C2E0F9FBBFA for ; Thu, 1 Mar 2007 08:49:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 36967-02 for ; Thu, 1 Mar 2007 08:49:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (Postfix) with ESMTP id 8AF2E9FBB37 for ; Thu, 1 Mar 2007 08:49:31 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id C41C66F91F; Thu, 1 Mar 2007 09:49:28 -0300 (ART) Received: from bugs.unl.edu.ar ([127.0.0.1]) by localhost (bugs.unl.edu.ar [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wA0XlmXymQAA; Thu, 1 Mar 2007 09:49:27 -0300 (ART) Received: by bugs.unl.edu.ar (Postfix, from userid 1000) id 680866F91E; Thu, 1 Mar 2007 09:49:27 -0300 (ART) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id 6250AFF07; Thu, 1 Mar 2007 09:49:27 -0300 (ART) Date: Thu, 1 Mar 2007 09:49:27 -0300 (ART) From: Martin Marques To: mikie cc: pgsql-php@postgresql.org Subject: Re: transactions from PHP - double COMMIT required? In-Reply-To: Message-ID: References: <20070301131523.fgfm83nb9y2kgo4c@imp3.uta.fi> MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 200703/7 X-Sequence-Number: 3719 On Thu, 1 Mar 2007, mikie wrote: > > Yes, that is nice way to work with databases, but I am on PHP4 and I > am not using the PDO. MDB2 has a similar sintaxis. > But getting back to my problem - perhaps there is something I > misunderstood: is it the client application responsibility to check if > the transaction failed or succeeded and issue COMMIT or ROLLBACK > accordingly (how do I close the transaction block in that case)? > Or is it the database server that is suppose to check if transaction > succeded and perform the query, or ROLLBACK if anything went wrong? PG will rollback all transactions that have an error in some part, as it=20 can't commit the transaction as a whole. -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 --------------------------------------------------------- Lic. Mart=EDn Marqu=E9s | SELECT 'mmarques' || Centro de Telem=E1tica | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------=