X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7D7D911F78EC for ; Sun, 2 Apr 2006 10:47:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74370-09 for ; Sun, 2 Apr 2006 10:47:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.188]) by postgresql.org (Postfix) with ESMTP id 4555F11F76C0 for ; Sun, 2 Apr 2006 10:47:10 -0300 (ADT) Received: by nproxy.gmail.com with SMTP id l24so784009nfc for ; Sun, 02 Apr 2006 06:47:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=RUQz/GK1z0eAMSdL+/vzgLngo+uYyGOieCQIYCQCwa7dZ7jlhj1D+qP+y17CBAws51Twkag4Jn5l0Yz6mScgUv0F+dsB3EgbYva2enYMNtkRP5uCG3tIiIO5OMX3NBwvjj2SodzPVxnlwHtfdMma1fw5qgnSWsNr1/H8mn0ogmM= Received: by 10.48.209.14 with SMTP id h14mr1609236nfg; Sun, 02 Apr 2006 06:47:10 -0700 (PDT) Received: by 10.49.26.20 with HTTP; Sun, 2 Apr 2006 06:47:10 -0700 (PDT) Message-ID: Date: Sun, 2 Apr 2006 19:17:10 +0530 From: "Rajesh Kumar Mallah" To: "Christopher Browne" Subject: Re: Show tables query Cc: pgsql-admin@postgresql.org In-Reply-To: <878xqo9m8q.fsf@wolfe.cbbrowne.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_23669_16198110.1143985630652" References: <20060402090706.6EB0911F6B01@postgresql.org> <878xqo9m8q.fsf@wolfe.cbbrowne.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.516 required=5 tests=[AWL=0.515, HTML_MESSAGE=0.001] X-Spam-Score: 0.516 X-Spam-Level: X-Archive-Number: 200604/12 X-Sequence-Number: 21181 ------=_Part_23669_16198110.1143985630652 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/2/06, Christopher Browne 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 table= s > 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=3D'BASE TABLE' ; if you need tables only otherwise it returns the Views also. That has the merit of actually conforming to SQL standards... > -- > output =3D 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 > ------=_Part_23669_16198110.1143985630652 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

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

Yes, it's called SELECT.

There is a standard schema called I= NFORMATION_SCHEMA, which contains a
variety of relevant views.

No= tably, you could request:

SELECT * FROM INFORMATION_SCHEMA.TABLES


where table_type=3D'BASE TABLE'
 

;=

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

That ha= s the merit of actually conforming to SQL standards...
--
output =3D = 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?

    &nb= sp;          http://archives.postgresql.org

------=_Part_23669_16198110.1143985630652--