Re: Suspected JDBC bug - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Suspected JDBC bug
Date
Msg-id alpine.BSO.2.03.1406272035350.15771@ejurka.com
Whole thread Raw
In response to Suspected JDBC bug  (Jim Gray <Jim.Gray@Bull.com>)
List pgsql-jdbc

On Fri, 27 Jun 2014, Jim Gray wrote:

>
> I have a test case (attached) which has this output:
>
>   Message:  The column name pnum was not found in this ResultSet.
>
>

The PG JDBC driver requires you to select all primary key columns to be
able to update a ResultSet.  The checking for this was not correct for
multicolumn primary keys and gave you the previous error message.  With
the attached patch it will say:

Updating first result set value: E2 , with new value: E9
SQL Exception processing result set for: SELECT ?
  SQLState: 24000
  SQLCode:  0
  Message:  ResultSet is not updateable.  The query that generated this
result set must select only one table, and must select all primary keys
from that table. See the JDBC 2.1 API Specification, section 5.6 for more
details.


Kris Jurka

Attachment

pgsql-jdbc by date:

Previous
From: Jim Gray
Date:
Subject: Suspected JDBC bug
Next
From: keshava
Date:
Subject: Postgres 9.3 JDBC issue with reading bytes