From: | "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com> |
---|---|
To: | "Christopher Browne" <cbbrowne(at)acm(dot)org> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Show tables query |
Date: | 2006-04-02 13:47:10 |
Message-ID: | a97c77030604020647n7a39f755oac89e4f715487e57@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 4/2/06, Christopher Browne <cbbrowne(at)acm(dot)org> wrote:
>
> After takin a swig o' Arrakan spice grog, andy(dot)shellam(at)mailnetwork(dot)co(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Grega Bremec | 2006-04-02 14:15:27 | Re: FW: Setting up of PITR system. |
Previous Message | Christopher Browne | 2006-04-02 12:48:37 | Re: Show tables query |