Re: How to obtain the list of data table name only - Mailing list pgsql-sql

From Richard Huxton
Subject Re: How to obtain the list of data table name only
Date
Msg-id 42D77936.3060708@archonet.com
Whole thread Raw
In response to How to obtain the list of data table name only  (sunny076@yahoo.com)
List pgsql-sql
sunny076@yahoo.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


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Help With complex join
Next
From: Kenneth Gonsalves
Date:
Subject: Re: difference between all RDBMSs