Re: Newbie question: How to check how many tables avaliable at that database?

From: Nils Zonneveld <nils(at)mbit(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Newbie question: How to check how many tables avaliable at that database?
Date: 2001-06-13 17:25:46
Message-ID: 3B27A218.F93DB88A@mbit.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-13 17:26:37 Re: Compilation of contrib of postgresql 7.1.2 with cygwin 1.3.2
Previous Message mazzo 2001-06-13 17:25:28 Problems with views