pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: sunny076@yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: How to obtain the list of data table name only
Date: Fri, 15 Jul 2005 09:52:06 +0100
Message-ID: <42D77936.3060708@archonet.com> (raw)
In-Reply-To: <1121379882.854728.128920@z14g2000cwz.googlegroups.com>
References: <1121379882.854728.128920@z14g2000cwz.googlegroups.com>

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



view thread (3+ messages)  latest in thread

Message-ID: <42D77936.3060708@archonet.com>
Permalink:  ../42D77936.3060708@archonet.com/
Also on:    postgresql.org/message-id/42D77936.3060708@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, sunny076@yahoo.com
  Subject: Re: How to obtain the list of data table name only
  In-Reply-To: <42D77936.3060708@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox