X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D92FF9FA315 for ; Tue, 6 Jun 2006 02:41:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 94343-08 for ; Tue, 6 Jun 2006 02:41:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id E40419FA111 for ; Tue, 6 Jun 2006 02:41:19 -0300 (ADT) Received: from 221x253x225x162.ap221.ftth.ucom.ne.jp ([221.253.225.162] helo=[192.168.1.171]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1FnUJX-0008U1-5L; Tue, 06 Jun 2006 17:41:15 +1200 Message-ID: <44851578.1060305@opencloud.com> Date: Tue, 06 Jun 2006 14:41:12 +0900 From: Oliver Jowett User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Rodrigo Willian Bonatto CC: pgsql-jdbc@postgresql.org Subject: Re: RES: PGJDBC 8 transaction problem References: <54CC7CADE26E884EB2BCEC863F5C1F7001012FEF@moscou.diuno.net> In-Reply-To: <54CC7CADE26E884EB2BCEC863F5C1F7001012FEF@moscou.diuno.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/20 X-Sequence-Number: 15300 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