From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Typing80wpm(at)aol(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: listing all tables |
Date: | 2005-04-22 04:00:11 |
Message-ID: | 20050422040011.GA45531@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Apr 21, 2005 at 11:33:07PM -0400, Typing80wpm(at)aol(dot)com wrote:
>
> My question is, what command can I issue to list all the tables in a
> database?
If you're using psql then you can use the \dt command, although that
will show only the tables in your search path (which is probably what
you're interested in). See "Meta-Commands" in the psql documentation
for more info; see also the "System Catalogs" and "The Information
Schema" chapters.
http://www.postgresql.org/docs/8.0/interactive/app-psql.html
http://www.postgresql.org/docs/8.0/interactive/catalogs.html
http://www.postgresql.org/docs/8.0/interactive/information-schema.html
One way to learn more about the system catalogs is to run "psql -E"
or execute "\set ECHO_HIDDEN" from within psql so you can see the
queries psql sends for commands like \dt, \d tablename, etc.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Dinesh Pandey | 2005-04-22 05:30:02 | How to install Postgres that supports 64-bit integer/date-time. |
Previous Message | Michael Fuhr | 2005-04-22 03:48:36 | Re: Regular expression. How to disable ALL meta-character |