pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Cottenceau <gc@mnc.ch>
To: pgsql-jdbc@postgresql.org
Subject: PGStatement#setUseServerPrepare breaking PreparedStatement#executeUpdate return value?
Date: 23 Feb 2005 17:24:56 +0100
Message-ID: <87wtszxmzr.fsf@meuh.mnc.ch> (raw)

Hi,

I use postgres-7.4.5 with postgresql-7.4.5.jar built out of it.

I have noticed that the int result from
PreparedStatement#executeUpdate for a DELETE statement is always
1 for me, even if 0 rows were affected by the statement, breaking
the JDBC API (or at least its documentation).

I have experimented and noticed that removing my call to
PGStatement#setUseServerPrepare(true) workarounds the bug.

Is there any way to workaround it otherwise? Is it a known and/or
normal bug?

Thanks,

-- 
Guillaume Cottenceau



view thread (2+ messages)  latest in thread

Message-ID: <87wtszxmzr.fsf@meuh.mnc.ch>
Permalink:  ../87wtszxmzr.fsf@meuh.mnc.ch/
Also on:    postgresql.org/message-id/87wtszxmzr.fsf@meuh.mnc.ch

 · 

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: gc@mnc.ch
  Subject: Re: PGStatement#setUseServerPrepare breaking PreparedStatement#executeUpdate return value?
  In-Reply-To: <87wtszxmzr.fsf@meuh.mnc.ch>
  References: <87wtszxmzr.fsf@meuh.mnc.ch>

* 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