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.