Re: Newbie question: How to check how many tables avaliable at that database? - Mailing list pgsql-general

From Nils Zonneveld
Subject Re: Newbie question: How to check how many tables avaliable at that database?
Date
Msg-id 3B27A218.F93DB88A@mbit.nl
Whole thread Raw
Responses Re: Re: Newbie question: How to check how many tables avaliable at that database?  (will trillich <will@serensoft.com>)
List pgsql-general

Carfield Yim wrote:
>
> I am a  new user of PostgreSQL dbms, how can I check how many tables
> avaliable at that database?

To get a list of tables through SQL:

SELECT tablename FROM pg_tables WHERE tablename NOT LIKE 'pg_%' ORDER BY tablename;

To get the number of tables through SQL:

SELECT count(*) FROM pg_tables WHERE tablename NOT LIKE 'pg_%';


HTH,

Nils Zonneveld

pgsql-general by date:

Previous
From: "Sergei Pohilko"
Date:
Subject: Problem with multibyte encoding
Next
From: Dip
Date:
Subject: Postgres Internals