pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Finding out table names
2+ messages / 2 participants
[nested] [flat]

* Finding out table names
@ 2000-04-19 19:10  Kristen Nostrand <kdnostr@california.sandia.gov>
  0 siblings, 1 reply; 2+ messages in thread

From: Kristen Nostrand @ 2000-04-19 19:10 UTC (permalink / raw)
  To: pgsql-questions@postgresql.org; pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Finding out table names
@ 2000-04-19 20:22  tjk@tksoft.com <tjk@tksoft.com>
  parent: Kristen Nostrand <kdnostr@california.sandia.gov>
  0 siblings, 0 replies; 2+ messages in thread

From: tjk@tksoft.com @ 2000-04-19 20:22 UTC (permalink / raw)
  To: kdnostr@california.sandia.gov; +Cc: pgsql-questions@postgresql.org; pgsql-sql

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
> 




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-04-19 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-04-19 19:10 Finding out table names Kristen Nostrand <kdnostr@california.sandia.gov>
2000-04-19 20:22 ` tjk@tksoft.com <tjk@tksoft.com>

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