DatabaseMetaData.getTables() ignoring a table?

From: Dustin Sallings <dustin+postgres(at)spy(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: DatabaseMetaData.getTables() ignoring a table?
Date: 2002-01-19 10:31:27
Message-ID: Pine.OSX.4.43.0201190221310.17942-100000@dustinmobile
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


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(at)spy(dot)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. ____________

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ned Wolpert 2002-01-19 16:05:52 Re: HELP: Error opening connection to dburl: jdbc:postgresql://localhost/test
Previous Message Justin Clift 2002-01-19 08:26:04 Re: Problem with getImportedKeys / getExportedKeys