From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: getTables() not working for information_schema or pg_catalog
Date: Sat, 26 Nov 2005 00:49:16 +0100
Message-ID: <dm87tt$vp$1@sea.gmane.org> (raw)
In-Reply-To: <Pine.BSO.4.61.0511251739160.2567@leary.csoft.net>
References: <dm7eel$q6f$1@sea.gmane.org>
<Pine.BSO.4.61.0511251739160.2567@leary.csoft.net>
Kris Jurka wrote on 25.11.2005 23:42:
>> 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.
>
You are right, when I pass all the types from getTableTypes() then I'll
get everything. I can live with that for now, but according to the docs
this indeed should work differently.
Thanks for your help
Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: getTables() not working for information_schema or pg_catalog
In-Reply-To: <dm87tt$vp$1@sea.gmane.org>
References: <dm7eel$q6f$1@sea.gmane.org> <Pine.BSO.4.61.0511251739160.2567@leary.csoft.net> <dm87tt$vp$1@sea.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox