Re: autocommit trouble with jdbc on Postgres 7.4 - Mailing list pgsql-jdbc

From Bob Cart
Subject Re: autocommit trouble with jdbc on Postgres 7.4
Date
Msg-id 87C6F405-23A9-11D8-97C0-000A95BA17FE@cartdev.com
Whole thread Raw
In response to Re: autocommit trouble with jdbc on Postgres 7.4  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: autocommit trouble with jdbc on Postgres 7.4
Re: autocommit trouble with jdbc on Postgres 7.4
List pgsql-jdbc
On Nov 30, 2003, at 4:40 PM, Oliver Jowett wrote:
> AFAIK the driver never generates SET AUTOCOMMIT TO OFF; the only thing
> it
> does with server-side autocommit is to turn it on if the backend
> defaults to
> off (as is possible with a 7.3 server). So I'd hazard a guess that the
> problematic query is actually being generated by your application
> code, not
> the JDBC driver; there's not much the driver can do about that case.
>
> Can you provide the full exception & stack trace that's generated, and
> ideally a statement trace from the backend?
>
> (I took a quick look at the download URL you mentioned in a later
> email, but
> it's registration-required).
>
> -O

Right. The driver for 7.4 should not even be able to generate SET
AUTOCOMMIT TO OFF. That's one reason why I think this is a jdbc issue
and not an application issue. The other reason is that the app works
with so many other databases - including postgres 7.3. Also, the
logistics of the release don't make it likely that the driver has been
updated for all the changes that happened late in teh development cycle
of pg7.4. 7.4 was just released a couple of weeks ago. From looking at
various threads out on the net, Tom Lane removed the server side
autocommit pretty recently. Now that the most recent jdbc driver the
7.4 beta was posted back in september, I don't see how it could have
been patched up to support the autocommit change. Now if you are right
and the driver never was able to SET AUTOCOMMIT TO OFF anyway, well we
do have a tricky one. My guess is the application I'm using isn't smart
enough to come up with an error string that says,  "Error: SET
AUTOCOMMIT TO OFF no longer supported". That's delivered via the jdbc
driver. Doesn't seem to me that an app should be able to make the drive
throw that even if it tried.

Some brave soul out there needs to dig into that part of the driver
code to see what's up. Go for it Oliver!

Bob


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: autocommit trouble with jdbc on Postgres 7.4
Next
From: Dave Tenny
Date:
Subject: Re: autocommit trouble with jdbc on Postgres 7.4