Re: RES: PGJDBC 8 transaction problem

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Rodrigo Willian Bonatto <bonatto(at)diuno(dot)com(dot)br>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: RES: PGJDBC 8 transaction problem
Date: 2006-06-06 05:41:12
Message-ID: 44851578.1060305@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message surabhi.ahuja 2006-06-07 11:54:33 date value not geting inserted properly
Previous Message Dave Cramer 2006-06-05 18:09:10 Re: RES: PGJDBC 8 transaction problem