pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: aspire420@hotpop.com, Sai Hertz And Control Systems <sank89@sancharnet.in>
Cc: pgsql-php@postgresql.org
Subject: Re: [ADMIN] PHP and autocommit of PostgreSQL 7.4
Date: Fri, 12 Dec 2003 00:50:24 +0100
Message-ID: <200312120050.24690.peter_e@gmx.net> (raw)
In-Reply-To: <1071185106.1792.8265.camel@camel>
References: <3FD8E2C0.5060803@sancharnet.in>
	<200312112317.59269.peter_e@gmx.net>
	<1071185106.1792.8265.camel@camel>

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.




view thread (6+ messages)  latest in thread

Message-ID: <200312120050.24690.peter_e@gmx.net>
Permalink:  ../200312120050.24690.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200312120050.24690.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: peter_e@gmx.net, xzilla@users.sourceforge.net, sank89@sancharnet.in
  Subject: Re: [ADMIN] PHP and autocommit of PostgreSQL 7.4
  In-Reply-To: <200312120050.24690.peter_e@gmx.net>
  References: <3FD8E2C0.5060803@sancharnet.in> <200312112317.59269.peter_e@gmx.net> <1071185106.1792.8265.camel@camel> <200312120050.24690.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox