Re: How to obtain the list of data table name only

From: Richard Huxton <dev(at)archonet(dot)com>
To: sunny076(at)yahoo(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to obtain the list of data table name only
Date: 2005-07-15 08:52:06
Message-ID: 42D77936.3060708@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

sunny076(at)yahoo(dot)com wrote:
> Hi,
>
> I am wondering if anyone can tell me how I can obtain only the list of
> data table in postgresql without function and other ancillary tables. I
> hope that I can add a tag that can filter only data table.
>
> I am using the following SQL Statement:
>
> "SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES"

Something like this perhaps?

SELECT * FROM information_schema.tables
WHERE table_schema='public' AND table_type='BASE TABLE';

Of course, you'll probably want to allow for multiple schemas.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2005-07-15 08:57:36 Re: Help With complex join
Previous Message Richard Huxton 2005-07-15 08:48:47 Re: difference between all RDBMSs