On Wed, 5 Aug 1998, James Andrews wrote:
> I need to know how to get a list of table names that exist in a particular
> database using Pg. I know how to do it command line, but I need my scripts
> to be able to do it for error checking, and I haven't found a single doc on
> it.
select relname from pg_class where relkind='r' and relname !~ '^pg_'
relkind='r' gets all relations (tables) and relname!~'^pg_' excludes all
system tables.
Maarten
_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems |
| Department of Electrical Engineering |
| Computer Architecture and Digital Technique section |
| M.Boekhold@et.tudelft.nl |
-----------------------------------------------------------------------------