pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Rodrigo Willian Bonatto <bonatto@diuno.com.br>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: RES: PGJDBC 8 transaction problem
Date: Tue, 06 Jun 2006 14:41:12 +0900
Message-ID: <44851578.1060305@opencloud.com> (raw)
In-Reply-To: <54CC7CADE26E884EB2BCEC863F5C1F7001012FEF@moscou.diuno.net>
References: <54CC7CADE26E884EB2BCEC863F5C1F7001012FEF@moscou.diuno.net>

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



view thread (3+ messages)

Message-ID: <44851578.1060305@opencloud.com>
Permalink:  ../44851578.1060305@opencloud.com/
Also on:    postgresql.org/message-id/44851578.1060305@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, bonatto@diuno.com.br
  Subject: Re: PGJDBC 8 transaction problem
  In-Reply-To: <44851578.1060305@opencloud.com>
  References: <54CC7CADE26E884EB2BCEC863F5C1F7001012FEF@moscou.diuno.net> <44851578.1060305@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox