(JDBC) KEY_SEQ in Foreign Key result set starts at 0, should be 1
(JDBC) KEY_SEQ in Foreign Key result set starts at 0, should be 1
От:
David Goodenough <david.goodenough@btconnect.com>
Дата:
Using the JDBC interface to inspect the metadata in a table, the ResultSet returned from using DatabaseMetaData.getImportedKeys includes values for KEY_SEQ. This is an integer value and in the case of Postgreql starts at zero. I can find no formal definition of where this value should start but the ODBC rules explicitly state that it should start at 1 and both DB/2 and MySQL seem to agree. To fix this line 2437 of jdbc2/DatabaseMetaData.java needs to be changed from:- short seq = 0; to:- short seq = 1; The same change is required in jdbc1/DatabaseMetaData.java.