Re: Patch for handling "autocommit=false" in postgresql.conf

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: snpe <snpe(at)snpe(dot)co(dot)yu>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Patch for handling "autocommit=false" in postgresql.conf
Date: 2002-09-17 14:26:14
Message-ID: 23695.1032272774@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

regards, tom lane

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Daniel Serodio 2002-09-17 14:40:33 NOTICE causing SQLException
Previous Message snpe 2002-09-17 12:25:50 Patch for handling "autocommit=false" in postgresql.conf