Re: Show tables query - Mailing list pgsql-admin

From Rajesh Kumar Mallah
Subject Re: Show tables query
Date
Msg-id a97c77030604020647n7a39f755oac89e4f715487e57@mail.gmail.com
Whole thread Raw
In response to Re: Show tables query  (Christopher Browne <cbbrowne@acm.org>)
List pgsql-admin


On 4/2/06, Christopher Browne <cbbrowne@acm.org> wrote:
After takin a swig o' Arrakan spice grog, andy.shellam@mailnetwork.co.uk ("Andy Shellam") belched out:
> Is there an SQL command supported by Postgres to return a list of tables in a database?

Yes, it's called SELECT.

There is a standard schema called INFORMATION_SCHEMA, which contains a
variety of relevant views.

Notably, you could request:

SELECT * FROM INFORMATION_SCHEMA.TABLES


where table_type='BASE TABLE'
 

;

if you need tables only otherwise it returns the Views also.

That has the merit of actually conforming to SQL standards...
--
output = reverse(" moc.liamg" "@" "enworbbc")
http://cbbrowne.com/info/
They have finally found the most ultimately useless thing on the web...
Found at the Victoria's Secret website:
   "The online shop: Text Only Listing"

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

pgsql-admin by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Show tables query
Next
From: Grega Bremec
Date:
Subject: Re: FW: Setting up of PITR system.