Thread: DatabaseMetaData.getTables() ignoring a table?

DatabaseMetaData.getTables() ignoring a table?

From
Dustin Sallings
Date:
    I decided to play with some metadata tonight, so I wrote a little
app that will dump a database and show me keys and all that.
Unfortunately, it seems to ignore the table with the most references.  :(
I took out the getExportedKeys part so that it just lists the keys, and I
get the same behavior.  Anyone know why this would happen:

money=# \dt
          List of relations
        Name        | Type  | Owner
--------------------+-------+--------
 money_accounts     | table | dustin
 money_categories   | table | dustin
 money_group_xref   | table | dustin
 money_groups       | table | dustin
 money_transactions | table | dustin
 money_users        | table | dustin
(6 rows)

        String types[]={"TABLE"};
        DatabaseMetaData dmd=getDatabaseMetaData(
            args[0], args[1], args[2], args[3]);

        ResultSet rs=dmd.getTables(null, "", null, types);
        while(rs.next()) {
            Table t=new Table(dmd, rs.getString("TABLE_NAME"));
            System.out.println(t);
        }
        rs.close();

Yields:

Table:  money_accounts
Table:  money_categories
Table:  money_group_xref
Table:  money_groups
Table:  money_users


    Specifically, money_transactions does not show up, even if types[]
is null.  Any reason the driver would skip over that table?

--
SPY                      My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________