Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id ABDFE63283F for ; Wed, 8 Sep 2010 17:35:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 63602-01 for ; Wed, 8 Sep 2010 20:35:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 54F506322CA for ; Wed, 8 Sep 2010 17:35:05 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OtRMF-0006TB-Bo for pgsql-jdbc@postgresql.org; Wed, 08 Sep 2010 22:35:03 +0200 Received: from gaia.teamforge.de ([194.231.230.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Sep 2010 22:35:03 +0200 Received: from boris by gaia.teamforge.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Sep 2010 22:35:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Boris Folgmann Subject: Bug in ResultSet.deleteRow() implementation Date: Wed, 08 Sep 2010 21:21:06 +0200 Lines: 40 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: gaia.teamforge.de User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100726 Lightning/1.0b1 SeaMonkey/2.0.6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/13 X-Sequence-Number: 20883 Hi, I couldn't find some information about a bug tracker on jdbc.postgresql.org, so here's my bug report: I do a SELECT pay_key FROM invoices; and then delete some expired invoices using deleteRow() on the ResultSet. This throws org.postgresql.util.PSQLException: The column name iid was not found in this ResultSet. at org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2562) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.isUpdateable(AbstractJdbc2ResultSet.java:1535) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkUpdateable(AbstractJdbc2ResultSet.java:2661) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.deleteRow(AbstractJdbc2ResultSet.java:715) iid is the primary key of invoices. If I change the query to SELECT pay_key, iid FROM invoices; deleteRow() works. But I don't need iid in the query because it's not relevant for determining if the invoice expired. So I found a work-around, but please fix this, as it is not required by the JDBC spec to include the primary key in the query. My system: postgresql-8.4-702.jdbc4.jar postgresql-8.1.21-1.el5_5.1 on CentOS 5.5. java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode) cu, boris