On 03/31/2003 01:20:59 PM sqlobject-discuss-admin wrote:
>my understanding is that
>database introspection in Postgres is a lot harder than MySQL. I have
>to figure out how to do tableExists in Postgres too...
Not at all. Just rummage through the PostgreSQL system catalogs named pg_*.
See
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=catalogs.html
For example, all relations are listed in pg_class. So, select relName,
relkind from pg_class where relkind = 'r' gives you a list of all
relations, including the system relations.
...Edmund.
|