Thread: Re: [GENERAL] listing all tables

Re: [GENERAL] listing all tables

From
Fandarel
Date:
>   How would I list all tables in a database?

You can list all tables with:

select * from pg_class;

but that will give you system tables also.

I think that if you use the \z command in psql, it will give you a list
of all tables in the current database.

Matt


Re: [GENERAL] listing all tables

From
Rostislav Matl
Date:
On 16-Jul-98 Fandarel wrote:
>>   How would I list all tables in a database?
>
> You can list all tables with:
>
> select * from pg_class;
>
> but that will give you system tables also.
>
> I think that if you use the \z command in psql, it will give you a list
> of all tables in the current database.
>
> Matt
>

It's in docs even maybe in FAQs, or in archive - it was already discussed.

+-----------------------------------------------------------------------------+
|  ROSTISLAV MATL, student of Masaryk University - Faculty of Informatics     |
|  e-mail: xmatl@fi.muni.cz      WWW: http://www.fi.muni.cz/~xmatl/index.html |
+-----------------------------------------------------------------------------+