Re: getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows - Mailing list pgsql-jdbc

From dmp
Subject Re: getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows
Date
Msg-id 4C505498.5070506@ttc-cmc.net
Whole thread Raw
In response to getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows  ("Panon, Paul-Andre" <Paul-AndrePanon@SierraSystems.com>)
List pgsql-jdbc
>
>
>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
befiltering 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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Wrong SqlType for boolean columns
Next
From: James William Pye
Date:
Subject: Re: [HACKERS] Trouble with COPY IN