From: | Boris Folgmann <boris(at)folgmann(dot)de> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Bug in ResultSet.deleteRow() implementation |
Date: | 2010-09-08 19:21:06 |
Message-ID: | i68nn2$1ch$1@dough.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | joiny | 2010-09-09 00:24:53 | Re: postgresql 8.4 type mapping problem |
Previous Message | Fabien Jalabert | 2010-09-08 12:09:27 | Re: Send a command to postgres and close the program |