Thread: getTables() Implementation

getTables() Implementation

From
Robinson
Date:

Hi,

In my postgres database, I have three catalogs. Template0, Template1 and qiws.  I want to get all the tables from the qiws catalog.  PSQL however displays 59 objects inluding tables, sequences, views.  The following snippet returns nothing.

   DatabaseMetaData dbMeta = connect.getMetaData();
   ResultSet rs = dbMeta.getTables("qiws", null, "%", null);
   while (rs.next()) {
    System.out.println(rs.getObject(1));  // prints nothing
   }

Is getTables() implemented in the driver or am I misinterpreting something?

Thanks,
Richie

 



Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site

Re: getTables() Implementation

From
Robinson
Date:

Got it working.  Had to take a peek in the source code to see what I was missing.    Ah! the beauty of open-source development.

Thanks

 Robinson <netviews@yahoo.com> wrote:

Hi,

In my postgres database, I have three catalogs. Template0, Template1 and qiws.  I want to get all the tables from the qiws catalog.  PSQL however displays 59 objects inluding tables, sequences, views.  The following snippet returns nothing.

   DatabaseMetaData dbMeta = connect.getMetaData();
   ResultSet rs = dbMeta.getTables("qiws", null, "%", null);
   while (rs.next()) {
    System.out.println(rs.getObject(1));  // prints nothing
   }

Is getTables() implemented in the driver or am I misinterpreting something?

Thanks,
Richie

 



Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site



Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site