Bug #589: JDBC KEY_SEQ in getImportedKey starts at 0

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #589: JDBC KEY_SEQ in getImportedKey starts at 0
Date: 2002-02-15 11:51:07
Message-ID: 200202151151.g1FBp7B38160@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

David Goodenough (david(dot)goodenough(at)btconnect(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
JDBC KEY_SEQ in getImportedKey starts at 0

Long Description
getImportedKey from DatabaseMetaData returns a ResultSet and in that
ResultSet are values with a key KEY_SEQ. In Postgresql this starts
at 0, but DB/2 and MySql both start at 1. I can find no document
which requires a particular start for JDBC, but the ODBC docs do
require this to start at 1.

Change is needed to both jdbc2/DatabaseMetaData.java and the jdbc1
version. There is a short seq = 0; which needs to be changed to
short seq = 1;

Sample Code

No file was uploaded with this report

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2002-02-15 12:06:07 Bug #590: Migration to Postgres 7.2 impossible when capitals are used in database name
Previous Message David Goodenough 2002-02-15 11:46:10 (JDBC) KEY_SEQ in Foreign Key result set starts at 0, should be 1