pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Boris Folgmann <boris@folgmann.de>
To: pgsql-jdbc@postgresql.org
Subject: Bug in ResultSet.deleteRow() implementation
Date: Wed, 08 Sep 2010 21:21:06 +0200
Message-ID: <i68nn2$1ch$1@dough.gmane.org> (raw)

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




Message-ID: <i68nn2$1ch$1@dough.gmane.org>
Permalink:  ../i68nn2$1ch$1@dough.gmane.org/
Also on:    postgresql.org/message-id/i68nn2$1ch$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: boris@folgmann.de
  Subject: Re: Bug in ResultSet.deleteRow() implementation
  In-Reply-To: <i68nn2$1ch$1@dough.gmane.org>
  References: <i68nn2$1ch$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox