pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Haller <ch@rodos.fzk.de>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: session-wide autocommit off
Date: Tue, 30 Nov 2004 13:08:33 +0100
Message-ID: <41AC62C0.34D50EC7@rodos.fzk.de> (raw)
References: <41AC31F5.CE3589FB@rodos.fzk.de>
	<41AC3CAA.2040201@archonet.com>

Richard Huxton wrote:

> Christoph Haller wrote:
> > Looks like I asked the wrong question the other day.
> > How can I achieve a session-wide autocommit off?
> > As it is possible inside a psql session via
> > \unset AUTOCOMMIT
> > I am using the libpq interface.
>
> Just BEGIN a transaction after connection? Or am I missing something here?
>

Since the server-side autocommit off was abolished in 7.4
I am looking for a session-wide replacement, meaning
as long as one connection is running, after every COMMIT
the next SQL-command triggers an implicit BEGIN.
I know the usual answer to requests like this is "Fix Your Code",
but the Release Notes on 7.4 state
The server-side autocommit setting was removed and reimplemented in
client applications and languages. Server-side
autocommit was causing too many problems with languages and applications
that wanted to control their own autocommit
behavior, so autocommit was removed from the server and added to
individual client APIs as appropriate.

So basically, I cannot find the autocommit-off-switch within the libpg
interface.
TIA
Regards, Christoph





view thread (4+ messages)

Message-ID: <41AC62C0.34D50EC7@rodos.fzk.de>
Permalink:  ../41AC62C0.34D50EC7@rodos.fzk.de/
Also on:    postgresql.org/message-id/41AC62C0.34D50EC7@rodos.fzk.de

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ch@rodos.fzk.de, dev@archonet.com
  Subject: Re: session-wide autocommit off
  In-Reply-To: <41AC62C0.34D50EC7@rodos.fzk.de>

* 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