Skip site navigation (1) Skip section navigation (2)

Re: PGStatement#setUseServerPrepare breaking

From: Kris Jurka <books(at)ejurka(dot)com>
To: Guillaume Cottenceau <gc(at)mnc(dot)ch>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PGStatement#setUseServerPrepare breaking
Date: 2005-02-23 19:03:54
Message-ID: Pine.BSO.4.56.0502231402410.11888@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Wed, 23 Feb 2005, Guillaume Cottenceau wrote:

> 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?
> 

This is a known bug that requires upgrading to either the 8.0 server which 
returns the correct command completion tag on EXECUTE, or the 8.0 driver 
which uses protocol level prepared statements instead of SQL PREPARE / 
EXECUTE.

Kris Jurka

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-02-23 19:09:39
Subject: Re: [postgis-devel] JDBC & WKB - 400% overhead
Previous:From: Markus SchaberDate: 2005-02-23 17:35:30
Subject: Re: [postgis-devel] JDBC & WKB - 400% overhead

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group