X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E5B71DBE24 for ; Fri, 25 Nov 2005 19:51:08 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04006-06 for ; Fri, 25 Nov 2005 23:51:10 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2A955DBE1B for ; Fri, 25 Nov 2005 19:51:05 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EfnKN-0004xD-Va for pgsql-jdbc@postgresql.org; Sat, 26 Nov 2005 00:50:04 +0100 Received: from ppp-82-135-72-123.mnet-online.de ([82.135.72.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Nov 2005 00:50:03 +0100 Received: from spam_eater by ppp-82-135-72-123.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Nov 2005 00:50:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: getTables() not working for information_schema or pg_catalog Date: Sat, 26 Nov 2005 00:49:16 +0100 Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ppp-82-135-72-123.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.6) Gecko/20050317 Thunderbird/1.0.2 Mnenhy/0.7.2.0 X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/211 X-Sequence-Number: 14309 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