In pgjdbc, I believe the DatabaseMetaData code is incorrectly handling the schemaPattern.
According to the interface docs, an empty schemaPattern should retrieve “those without a schema”. While null means "the
schemaPatternshould not be used to narrow the search”. This same info appears for any schemaPattern in any method of
theinterface (http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html).
All through AbstractJdbc2DatabaseMetaData.java, anywhere schemaPattern appears, you’ll see code like this:
if (schemaPattern != null && !"".equals(schemaPattern))
{
sql += ...
}
It seems these should simply be null checks only. Does that seem like the correct interpretation?
-kw