From: dmp <danap@ttc-cmc.net>
To: Paul-AndrePanon@SierraSystems.com
To: pgsql-jdbc@postgresql.org
Subject: Re: getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows
Date: Wed, 28 Jul 2010 10:02:32 -0600
Message-ID: <4C505498.5070506@ttc-cmc.net> (raw)
In-Reply-To: <84D20D8353A4AB4F96ED08738919009A2BBBDE1C82@SCVANEX7.sierrasys.com>
References: <84D20D8353A4AB4F96ED08738919009A2BBBDE1C82@SCVANEX7.sierrasys.com>
>
>
>The PostgreSQL driver appears to be causing some unexpected behaviour for the OpenNMS installer on Windows.
>
>In the following code snippet, the table row set returned includes TABLEs, SEQUENCEs, and INDEXes. Shouldn't getTables be filtering out and returning only tables and views?
>
> public void databaseSetUser() throws SQLException {
> Connection adminConn = getAdminConnection();
> ResultSet rs = adminConn.getMetaData().getTables(null, "public", "%", null);
>
In your argument for getTables(catalog, schemaPattern, tableNamePattern,
tableTypes) you
have specified a null for the tableTypes. That I believe does not place
any restrictions on
the returned table, so VIEW and other types will be returned.
types - A list of table types, which must be from the list of table
types returned from getTableTypes(), to include; null returns
all types.
danap
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: danap@ttc-cmc.net, Paul-AndrePanon@SierraSystems.com
Subject: Re: getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows
In-Reply-To: <4C505498.5070506@ttc-cmc.net>
References: <84D20D8353A4AB4F96ED08738919009A2BBBDE1C82@SCVANEX7.sierrasys.com> <4C505498.5070506@ttc-cmc.net>
* 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