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: | snpe <snpe(at)snpe(dot)co(dot)yu>, pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Patch for handling "autocommit=false" in postgresql.conf |
Date: | 2002-09-18 05:01:14 |
Message-ID: | 200209180501.g8I51Fg29670@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Tom Lane wrote:
> snpe <snpe(at)snpe(dot)co(dot)yu> writes:
> > + // handle autocommit=false in postgresql.conf
> > + if (haveMinimumServerVersion("7.3")) {
> > + ExecSQL("set autocommit to on; commit;");
> > + }
>
> The above will fill people's logs with
> WARNING: COMMIT: no transaction in progress
> if they don't have autocommit off.
>
> Use
> begin; set autocommit to on; commit;
> instead.
>
> I would recommend holding off on this patch altogether, actually,
> until we decide whether SET will be a transaction-initiating
> command or not. I would still like to persuade the hackers community
> that it should not be.
Sorry to be blocking that change but I can see no reason to special case
SET to not start a new transaction, especially since we added SET to be
rollbackable in 7.3. If we hadn't done that, you easily could make a
case for it because the SET would behave without transaction semantics.
--
Bruce Momjian | http://candle.pha.pa.us
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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paesold | 2002-09-18 13:36:34 | JDBC and fetching the OID of an insert |
Previous Message | Al Sutton | 2002-09-17 19:05:24 | JDBC API Tests |