From: tjk@tksoft.com <tjk@tksoft.com>
To: kdnostr@california.sandia.gov
Cc: pgsql-questions@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Finding out table names
Date: Wed, 19 Apr 2000 13:22:48 -0700 (PDT)
Message-ID: <200004192022.NAA24872@uno.tksoft.com> (raw)
In-Reply-To: <38FE04B9.CA6AFFFC@ca.sandia.gov>
Kristen,
Here's what I use.
SELECT relname FROM pg_class WHERE relkind='r' and relname NOT LIKE 'pg_%' order by relname
Obviously, if you have tables which start with "pg_," then this solution
is not going to work.
I don't know how orthodox this solution is, or whether there are
serious problems with it. Maybe we'll find out now.
Troy
>
> I'm doing some database programming using Java/JDBC. I'd
> like to know how to find the table names contained in a
> database/schema. Is there an SQL statement for doing that?
>
> Kristen
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tjk@tksoft.com, kdnostr@california.sandia.gov, pgsql-questions@postgresql.org
Subject: Re: Finding out table names
In-Reply-To: <200004192022.NAA24872@uno.tksoft.com>
References: <38FE04B9.CA6AFFFC@ca.sandia.gov> <200004192022.NAA24872@uno.tksoft.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