Bug in ResultSet.deleteRow() implementation

Поиск
Список
Период
Сортировка
От Boris Folgmann
Тема Bug in ResultSet.deleteRow() implementation
Дата
Msg-id i68nn2$1ch$1@dough.gmane.org
обсуждение исходный текст
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Fabien Jalabert
Дата:
Сообщение: Re: Send a command to postgres and close the program
Следующее
От: joiny
Дата:
Сообщение: Re: postgresql 8.4 type mapping problem