Re: getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows

From: dmp <danap(at)ttc-cmc(dot)net>
To: Paul-AndrePanon(at)SierraSystems(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: getMetaData().getTables() behaviour with JDBC3 8.3 & 8.4 drivers on windows
Date: 2010-07-28 16:02:32
Message-ID: 4C505498.5070506@ttc-cmc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message James William Pye 2010-07-28 16:31:32 Re: [HACKERS] Trouble with COPY IN
Previous Message Oliver Jowett 2010-07-28 09:19:47 Re: Wrong SqlType for boolean columns