Re: [GENERAL] How to find names of tables in a database?

From: Valerie Mates <popcorn(at)tir(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, djackson(at)cpsgroup(dot)com (Jackson, DeJuan)
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] How to find names of tables in a database?
Date: 1998-10-15 03:27:05
Message-ID: 3.0.5.32.19981014232705.00797770@tir.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 07:43 PM 10/14/98 -0400, Bruce Momjian wrote:
>> 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.
>
>
Yup. I found this entry in the FAQ, but unfortunately I'm using a Linux
box where the PostgreSQL binaries were installed from an RPM, so the psql
source isn't anywhere to be found.

Anyway, thanks to you and to the other the kind souls who sent me the
information I needed. I think I'm all set now. Much appreciated!

-Valerie

-------------------------------------------------------------------
Valerie Mates * Web Developer * http://www.valeriemates.com
valerie(at)cyberspace(dot)org * (734) 995-6716
-------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrea Antibo 1998-10-15 07:34:39 Re: [GENERAL] make[2]: *** [psql] Error 1
Previous Message Bruce Momjian 1998-10-14 23:43:06 Re: [GENERAL] How to find names of tables in a database?