Re: getTables() not working for information_schema or pg_catalog - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: getTables() not working for information_schema or pg_catalog
Date
Msg-id Pine.BSO.4.61.0511251739160.2567@leary.csoft.net
Whole thread Raw
In response to getTables() not working for information_schema or pg_catalog  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: getTables() not working for information_schema or pg_catalog  (Thomas Kellerer <spam_eater@gmx.net>)
Re: getTables() not working for information_schema or pg_catalog  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc

On Fri, 25 Nov 2005, Thomas Kellerer wrote:

> con.getMetaData().getTables(null, "information_schema", "%", null);
>
> (where con is a java.sql.Connection), I would assume to get all tables that
> are stored in the information_schema, but the returned ResultSet is empty
> (next() immediately returns false).
>
> The same is true when I call it with "pg_catalog"
> Passing null for the table name does not make a difference.
>

The usage of null as the last parameter for table types makes the driver
return only the default table types, not all of getTableTypes().  Things
like "SYSTEM TABLE" are not included in the default list so this is why
you get nothing from information_schema and pg_catalog.  Re-reading the
javadoc, it says "types - a list of table types to include; null returns
all types".  So clearly we're in violation of that.  Will look at a fix.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: getTables() not working for information_schema or pg_catalog
Next
From: Oliver Jowett
Date:
Subject: Re: SQLJ, any plans?