Thread: DatabaseMetaData.getPrimaryKeys()

DatabaseMetaData.getPrimaryKeys()

From
SNarayan@automatedlogic.com
Date:

I wrote earlier regarding a bug where getPrimaryKeys() returns an empty result set (in version PostgreSQL 7.3.3 JDBC3 jdbc driver build 112). The issue seems to be due to case sensitivity of the table name specified in the getPrimaryKeys method call.

databaseMetaData.getPrimaryKeys(null, null, 'TESTTABLE') returns empty result set,

However, databaseMetaData.getPrimaryKeys(null, null, 'testtable') returned the primary keys I expected.

The same issue seems to be present for the getIndexInfo() method also.

Hope this work around helps others for now,
sundar.



Re: DatabaseMetaData.getPrimaryKeys()

From
Kris Jurka
Date:

On Tue, 5 Aug 2003 SNarayan@automatedlogic.com wrote:

> I wrote earlier regarding a bug where getPrimaryKeys() returns an empty
> result set (in version PostgreSQL 7.3.3 JDBC3 jdbc driver build 112). The
> issue seems to be due to case sensitivity of the table name specified in
> the getPrimaryKeys method call.

This was a conscious decision.  See:


http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=3DC4510E.266D9F3D%40ejurka.com&rnum=1&prev=/groups%3Fq%3DDatabaseMetaData%2Bcase%2Bsensitive%2Bgroup:comp.databases.postgresql.interfaces.jdbc%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.databases.postgresql.interfaces.jdbc%26selm%3D3DC4510E.266D9F3D%2540ejurka.com%26rnum%3D1


Kris Jurka