Skip site navigation (1) Skip section navigation (2)

Re: SET autocommit begins transaction?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: SET autocommit begins transaction?
Date: 2002-09-18 23:29:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Why exactly did you want the initial SET to not be part of the
> > transaction?
> Primarily because existing client-side libraries issue lots of SETs
> while starting a connection.
> We may just have to say "those guys are broken if you turn off
> autocommit in postgresql.conf", but I am looking for a way around it.
> If SET didn't start a transaction then they wouldn't be broken...

OK, I can work with this.  If we assume the startup is the first
statement issued, then we could tell them they have to SET autocommit to
on first before doing anything else.

However, if you believe there could have been other SET's before the
startup stuff, my idea doesn't work because autocommit has to be at the
start of a transaction.

If you think there could have been other non-SET queries before the
startup script, then all of our ideas don't work because the SET would
already be in a transaction.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-bugs by date

Next:From: Sean ChittendenDate: 2002-09-18 23:32:46
Subject: Re: SET autocommit begins transaction?
Previous:From: Bruce MomjianDate: 2002-09-18 23:26:37
Subject: Re: SET autocommit begins transaction?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group