Re: autocommit trouble with jdbc on Postgres 7.4

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Bob Cart <bob(at)cartdev(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: autocommit trouble with jdbc on Postgres 7.4
Date: 2003-12-01 00:40:43
Message-ID: 20031201004043.GA14296@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bob Cart 2003-12-01 02:53:24 Re: autocommit trouble with jdbc on Postgres 7.4
Previous Message Bob Cart 2003-11-30 18:04:23 Re: autocommit trouble with jdbc on Postgres 7.4