Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 737F99FB53D for ; Thu, 1 Mar 2007 09:03:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 50100-04 for ; Thu, 1 Mar 2007 09:02:59 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id 3D89A9FB34B for ; Thu, 1 Mar 2007 09:02:59 -0400 (AST) Received: by an-out-0708.google.com with SMTP id c24so360082ana for ; Thu, 01 Mar 2007 05:02:58 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HX+ggTEruQ4Ye5edk0IgrpL/4KIGwcQZfBQzC8nmBiND+QqLrtdW6L7Hu4hpy5qFf+ZRxI0O8RBYGI3vYf2EFNI645oYzegWE4ODbrZa83oqHHnz93VKur5Oze/ByBxgL73zqWNxptK238qA7zLkLWZhtTp95v0lXImm4CbqK74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SPJ9IkEXOJh8dWkY92b/b//89hln5frbZ4Ze7PfhrpXTWLfSY3ZrtIb5xNRbVbr2NCsBF3cpnvZdXjj6wv9u/OTsJRMFiD6QcGCsCJcCj8JW8J/F331gTirlOeLyy40pcI7Shi7CHSu3OsjzCrU7Xy/sklOhABPUyVYhRKXqw3I= Received: by 10.100.144.11 with SMTP id r11mr569920and.1172754177803; Thu, 01 Mar 2007 05:02:57 -0800 (PST) Received: by 10.100.165.1 with HTTP; Thu, 1 Mar 2007 05:02:57 -0800 (PST) Message-ID: Date: Thu, 1 Mar 2007 14:02:57 +0100 From: mikie To: pgsql-php@postgresql.org Subject: Re: transactions from PHP - double COMMIT required? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070301131523.fgfm83nb9y2kgo4c@imp3.uta.fi> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/8 X-Sequence-Number: 3720 > > 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 > can't commit the transaction as a whole. OK, so my way of programming seems correct. Then why do I have to send another COMMIT after failed transaction to continue with next queries in the same php script ? -- Mike