[Fwd: Re: [JDBC] Patch for handling "autocommit=false" in postgresql.conf] - Mailing list pgsql-hackers

Did anything come of this discussion on whether SET initiates a 
transaction or not?

In summary what is the right way to deal with setting autocommit in clients?

thanks,
--Barry


-------- Original Message --------
Subject: Re: [JDBC] Patch for handling "autocommit=false" in postgresql.conf
Date: Tue, 17 Sep 2002 10:26:14 -0400
From: Tom Lane <[email protected]>
To: snpe <[email protected]>
CC: pgsql-jdbc <[email protected]>
References: <[email protected]>

snpe <[email protected]> writes:> +               // handle autocommit=false in postgresql.conf> +                if
(haveMinimumServerVersion("7.3")){> +                               ExecSQL("set autocommit to on; commit;");> +
      }
 

The above will fill people's logs withWARNING:  COMMIT: no transaction in progress
if they don't have autocommit off.

Usebegin; 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org






pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Diff for src/interfaces/libpq/fe-connect.c between version
Next
From: Bruce Momjian
Date:
Subject: Re: [Fwd: Re: [JDBC] Patch for handling "autocommit=false"