| From: | Robinson <netviews(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | getTables() |
| Date: | 2002-10-25 22:51:08 |
| Message-ID: | 20021025225108.30326.qmail@web20009.mail.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Hi,
Sorry folks it's me once again. The following method from DatabaseMetaData.java (v 1.48 JDBC2 compliant) excludes tables that have rules attached to it.
private static final String getTableTypes[][] = {
{"TABLE", "(relkind='r' and relhasrules='f' and relname !~ '^pg_' and relname !~ '^xinv')"},
{"VIEW", "(relkind='v' and relname !~ '^pg_')"},
{"INDEX", "(relkind='i' and relname !~ '^pg_')"},
{"SEQUENCE", "(relkind='S' and relname !~ '^pg_')"},
{"SYSTEM TABLE", "(relkind='r' and relname ~ '^pg_')"},
{"SYSTEM INDEX", "(relkind='i' and relname ~ '^pg_')"}
};
I don't think this is right because getTables() should essentially mimic the behavior of psql's \dt
Thanks,
Richie
---------------------------------
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kris Jurka | 2002-10-25 23:08:23 | Re: getTables() |
| Previous Message | Robinson | 2002-10-25 20:52:57 | Re: getTables() Implementation |