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

From Oliver Jowett
Subject Re: autocommit trouble with jdbc on Postgres 7.4
Date
Msg-id 20031201004043.GA14296@opencloud.com
Whole thread Raw
In response to autocommit trouble with jdbc on Postgres 7.4  (Bob Cart <bob@cartdev.com>)
Responses Re: autocommit trouble with jdbc on Postgres 7.4
List pgsql-jdbc
On Sat, Nov 29, 2003 at 10:13:10PM -0800, Bob Cart wrote:
> PostgreSQL 7.4 no longer supports server side SET AUTOCOMMIT TO OFF,
> thanks to Tom Lane. Problem is my java application server now breaks.
> When I try to save a record in the database, I get
> "java.sql.SQLException: ERROR:  SET AUTOCOMMIT TO OFF is no longer
> supported".  The code that sends this is jdbc compliant and works with
> about a dozen other rdbms including postgresql7.3. Isn't he whole point
> of jdbc to make it so clients don't need to be rewritten each
> database??? Please don't tell me to change my code code - it isn't mine
> and I can't.

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

pgsql-jdbc by date:

Previous
From: Bob Cart
Date:
Subject: Re: autocommit trouble with jdbc on Postgres 7.4
Next
From: Bob Cart
Date:
Subject: Re: autocommit trouble with jdbc on Postgres 7.4