Re: How to list which tables are available?

From: chet(at)crashed(dot)net (Chet Luther)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to list which tables are available?
Date: 2003-10-14 20:54:39
Message-ID: 3d88cfc9.0310141254.8c55c45@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

To get a list of the non-default tables in your database, do this:

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

If you really want all of the tables, including the ones PostgreSQL
creates by default, just do this:

SELECT tablename FROM pg_tables;

Hope this helps,
chet(at)crashed(dot)net

"B.W.H. van Beest" <bwvb(at)xs4all(dot)nl> wrote in message news:<3f8bc79c$0$58708$e4fe514c(at)news(dot)xs4all(dot)nl>...
> It seems so elementary, but how I get a list of which tables are
> available in a database. I can't find an SQL command for this, but there
> must be a way!
>
> Thanks.
>
> Bertwim

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-10-14 20:59:41 Re: Excute comnands OS from plpgsql
Previous Message Chet Luther 2003-10-14 20:50:33 Re: Create Function... ERROR: language "plpgsql" does not exist