X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 921038B9C92 for ; Wed, 23 Feb 2005 16:25:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51437-06 for ; Wed, 23 Feb 2005 16:25:05 +0000 (GMT) Received: from mnc.ch (unknown [212.23.250.43]) by svr1.postgresql.org (Postfix) with ESMTP id 6ED0F8B9B19 for ; Wed, 23 Feb 2005 16:25:03 +0000 (GMT) Received: (qmail 22310 invoked from network); 23 Feb 2005 17:25:01 +0100 Received: from 62-2-77-204.business.cablecom.ch (HELO meuh.mnc.ch) (62.2.77.204) by www.mnc.ch.com with SMTP; 23 Feb 2005 17:25:01 +0100 Received: by meuh.mnc.ch (Postfix, from userid 1000) id F1C6023F50C; Wed, 23 Feb 2005 17:24:56 +0100 (CET) To: pgsql-jdbc@postgresql.org Subject: PGStatement#setUseServerPrepare breaking PreparedStatement#executeUpdate return value? From: Guillaume Cottenceau Date: 23 Feb 2005 17:24:56 +0100 Message-ID: <87wtszxmzr.fsf@meuh.mnc.ch> Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/174 X-Sequence-Number: 12354 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