From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | djackson(at)cpsgroup(dot)com (Jackson, DeJuan) |
Cc: | popcorn(at)tir(dot)com, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] How to find names of tables in a database? |
Date: | 1998-10-14 23:43:06 |
Message-ID: | 199810142343.TAA02849@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I thought for sure this was on the FAQ...
> What you are looking for is the behavior of psql's \dt command.
> You can look at the psql source to get the exact query, but it's
> something like this:
> SELECT * FROM pg_class
> The \dt command filters out the system (WHERE rel_name NOT LIKE 'pg_%')
> tables and some other things so I'd look at it otherwise you get a few
> hundred tables in an empty database.
It's in there(the FAQ):
3.23) How do I get a list of tables, or other things I can see in psql?
See the file pgsql/src/bin/psql/psql.c. It contains SQL commands that
generate the output for psql's backslash commands.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Valerie Mates | 1998-10-15 03:27:05 | Re: [GENERAL] How to find names of tables in a database? |
Previous Message | Simon Drabble | 1998-10-14 23:22:33 | Re: [GENERAL] How to find names of tables in a database? |