From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | [Fwd: Re: [JDBC] Patch for handling "autocommit=false" in postgresql.conf] |
Date: | 2002-10-11 00:57:55 |
Message-ID: | 3DA62213.203@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 <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>
References: <200209171425(dot)50940(dot)snpe(at)snpe(dot)co(dot)yu>
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
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-10-11 03:48:54 | Re: Diff for src/interfaces/libpq/fe-connect.c between version 1.195 |
Previous Message | Bruce Momjian | 2002-10-10 18:41:27 | Re: Open items |