Re: RES: PGJDBC 8 transaction problem - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: RES: PGJDBC 8 transaction problem
Date
Msg-id 44851578.1060305@opencloud.com
Whole thread Raw
In response to RES: PGJDBC 8 transaction problem  ("Rodrigo Willian Bonatto" <bonatto@diuno.com.br>)
List pgsql-jdbc
Rodrigo Willian Bonatto wrote:

> Using BEGIN and COMMIT with PGJDBC 7.4 works perfectly but not with
> version 8.x.

BEGIN/COMMIT should work fine, they're just not the recommended way of
doing things. It sounds like you have your reasons for using them ..

As I said in my original reply, the problem lies in how you are
processing the results from a multistatement query:

>> You will need to use Statement.execute() / Statement.getMoreResults() /
>> Statement.getResultSet() to step to the 4th result and retrieve the
>> SELECT's results (you could also get at the UPDATE's update count in a
>> similar way).

It's not really a problem with BEGIN/COMMIT at all, I would expect that
you'd see the same issue with just an "UPDATE ...;SELECT ..." query

-O

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: RES: PGJDBC 8 transaction problem
Next
From: "surabhi.ahuja"
Date:
Subject: date value not geting inserted properly