pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to obtain the list of data table name only
3+ messages / 3 participants
[nested] [flat]
* How to obtain the list of data table name only
@ 2005-07-14 22:24 sunny076@yahoo.com
2005-07-15 08:52 ` Re: How to obtain the list of data table name only Richard Huxton <dev@archonet.com>
2005-07-15 12:16 ` Re: How to obtain the list of data table name only Neil Dugan <postgres@butterflystitches.com.au>
0 siblings, 2 replies; 3+ messages in thread
From: sunny076@yahoo.com @ 2005-07-14 22:24 UTC (permalink / raw)
To: pgsql-sql
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"
I would appreciate if anyone can enligten me on how this can be
achieve.
Sunny
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to obtain the list of data table name only
2005-07-14 22:24 How to obtain the list of data table name only sunny076@yahoo.com
@ 2005-07-15 08:52 ` Richard Huxton <dev@archonet.com>
1 sibling, 0 replies; 3+ messages in thread
From: Richard Huxton @ 2005-07-15 08:52 UTC (permalink / raw)
To: sunny076@yahoo.com; +Cc: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to obtain the list of data table name only
2005-07-14 22:24 How to obtain the list of data table name only sunny076@yahoo.com
@ 2005-07-15 12:16 ` Neil Dugan <postgres@butterflystitches.com.au>
1 sibling, 0 replies; 3+ messages in thread
From: Neil Dugan @ 2005-07-15 12:16 UTC (permalink / raw)
To: pgsql-sql
On Thu, 2005-07-14 at 15:24 -0700, 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"
>
> I would appreciate if anyone can enligten me on how this can be
> achieve.
>
> Sunny
I am not sure what you mean but one way to find out what tables there
are is to use the 'pg_tables' view.
select tablename from pg_tables;
Regards Neil.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-07-15 12:16 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-14 22:24 How to obtain the list of data table name only sunny076@yahoo.com
2005-07-15 08:52 ` Richard Huxton <dev@archonet.com>
2005-07-15 12:16 ` Neil Dugan <postgres@butterflystitches.com.au>
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