X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 565DDD1D351 for ; Thu, 11 Dec 2003 23:50:55 +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 32400-09 for ; Thu, 11 Dec 2003 19:50:27 -0400 (AST) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id 90462D1B440 for ; Thu, 11 Dec 2003 19:50:24 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id 456C056243; Fri, 12 Dec 2003 00:50:27 +0100 (CET) Received: from 192.168.2.126 (dsl-213-023-254-243.arcor-ip.net [213.23.254.243]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id 9FAC756240; Fri, 12 Dec 2003 00:50:26 +0100 (CET) From: Peter Eisentraut To: Robert Treat Subject: Re: [ADMIN] PHP and autocommit of PostgreSQL 7.4 Date: Fri, 12 Dec 2003 00:50:24 +0100 User-Agent: KMail/1.5.4 Cc: aspire420@hotpop.com, Sai Hertz And Control Systems , pgsql-php@postgresql.org References: <3FD8E2C0.5060803@sancharnet.in> <200312112317.59269.peter_e@gmx.net> <1071185106.1792.8265.camel@camel> In-Reply-To: <1071185106.1792.8265.camel@camel> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312120050.24690.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/46 X-Sequence-Number: 2492 Robert Treat wrote: > given you can override php.ini setting via php commands, ISTM > application developers could still control this even if it was an ini > setting. Think about which entity determines what setting is required for autocommit. It's not the database administrator, it's not the database end user, it's not some tuning guy, it's not the binding library -- it's the particular client application. Because only the client application knows how it will issue SQL commands and what autocommit mode it expects for proper functioning. Therefore, there is never a legitimate reason to control this setting anywhere else. > how do other languages handle this? IIRC in perl/dbi it is a > parameter of the connection string ie. > pg_connect(host=foo,user=bar,autocommit=on) in php-ish speak, which > doesn't seem like a bad way to do it. In JDBC there is a method on the connection that controls this setting, and the default setting is fixed in the spec (not determined by external configuration). In ECPG, autocommit is off. Those are the only interfaces I know that have sufficient standardization in this area. The Perl way you cite seems reasonable as well.