pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
session-wide autocommit off
4+ messages / 3 participants
[nested] [flat]

* session-wide autocommit off
@ 2004-11-30 08:40  Christoph Haller <ch@rodos.fzk.de>
  0 siblings, 2 replies; 4+ messages in thread

From: Christoph Haller @ 2004-11-30 08:40 UTC (permalink / raw)
  To: pgsql-sql

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.
TIA
Regards, Christoph





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [despammed] session-wide autocommit off
@ 2004-11-30 09:03  Andreas Kretschmer <akretschmer@despammed.com>
  parent: Christoph Haller <ch@rodos.fzk.de>
  1 sibling, 0 replies; 4+ messages in thread

From: Andreas Kretschmer @ 2004-11-30 09:03 UTC (permalink / raw)
  To: pgsql-sql

am  30.11.2004, um  9:40:21 +0100 mailte Christoph Haller folgendes:
> 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

For psql i have a /etc/psqlrc:

\unset AUTOCOMMIT
\set AUTOCOMMIT FALSE
begin;

But this works only one transaction.



regards, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
               Tel. NL Heynitz:  035242/47212
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: session-wide autocommit off
@ 2004-11-30 09:26  Richard Huxton <dev@archonet.com>
  parent: Christoph Haller <ch@rodos.fzk.de>
  1 sibling, 1 reply; 4+ messages in thread

From: Richard Huxton @ 2004-11-30 09:26 UTC (permalink / raw)
  To: Christoph Haller <ch@rodos.fzk.de>; +Cc: pgsql-sql

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?

-- 
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: session-wide autocommit off
@ 2004-11-30 12:08  Christoph Haller <ch@rodos.fzk.de>
  parent: Richard Huxton <dev@archonet.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Christoph Haller @ 2004-11-30 12:08 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: pgsql-sql

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2004-11-30 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30 08:40 session-wide autocommit off Christoph Haller <ch@rodos.fzk.de>
2004-11-30 09:03 ` Andreas Kretschmer <akretschmer@despammed.com>
2004-11-30 09:26 ` Richard Huxton <dev@archonet.com>
2004-11-30 12:08   ` Christoph Haller <ch@rodos.fzk.de>

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