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

From will trillich
Subject Re: Re: Newbie question: How to check how many tables avaliable at that database?
Date
Msg-id 20010621133703.B7582@serensoft.com
Whole thread Raw
In response to Re: Newbie question: How to check how many tables avaliable at that database?  (Nils Zonneveld <nils@mbit.nl>)
List pgsql-general
On Wed, Jun 13, 2001 at 07:25:46PM +0200, Nils Zonneveld wrote:
>
>
> 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_%';

to learn more of these tricks, start 'psql' with '-E' as in

    psql -E mydatabasenamehere

then when you give any '\d' command you'll see the sql behind
the scenes that does the work.

also try '\?' for more info on using psql.

--
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, "Some Came Running"

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

pgsql-general by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: WAL failure?
Next
From: will trillich
Date:
Subject: Re: Moving rows to another database