PGStatement#setUseServerPrepare breaking PreparedStatement#executeUpdate return value?

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: PGStatement#setUseServerPrepare breaking PreparedStatement#executeUpdate return value?
Date: 2005-02-23 16:24:56
Message-ID: 87wtszxmzr.fsf@meuh.mnc.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message dblasby 2005-02-23 17:25:01 Re: [postgis-devel] JDBC & WKB - 400% overhead
Previous Message Markus Schaber 2005-02-23 15:54:07 Re: Socket timeouts (probably)