pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Davis <sdavis2@mail.nih.gov>
To: Daniel Silverstone <dsilvers@digital-scurf.org>
To: pgsql-sql@postgresql.org
Subject: Re: table listing queries
Date: Thu, 25 Aug 2005 07:27:02 -0400
Message-ID: <BF332346.D26F%sdavis2@mail.nih.gov> (raw)
In-Reply-To: <1124968435.18119.1.camel@petitemort.i.digital-scurf.org>

On 8/25/05 7:13 AM, "Daniel Silverstone" <dsilvers@digital-scurf.org> wrote:

> Hi,
> 
> I know that questions like this have been asked in the past, but I can
> find no definitive answer to one particular part of my problem...
> 
> Namely, in MySQL I can say: "SHOW TABLES FROM 'dbname'" to list tables
> in a database I'm not currently connected to.
> 
> I can find no way of doing this in PgSQL.
> 
> Is there a way, or is postgres not letting me list the tables until I
> have connected to the database for security reasons?

There are system catalogs which contain the information about tables.

http://www.postgresql.org/docs/8.0/interactive/catalogs.html

However, they are specific to each database.  In other words, the storage of
database-specific information is all WITHIN the given database, so you need
to be physically accessing the given database to even see those tables (or
do the query).  

Sean




view thread (3+ messages)  latest in thread

Message-ID: <BF332346.D26F%sdavis2@mail.nih.gov>
Permalink:  ../BF332346.D26F%25sdavis2@mail.nih.gov/
Also on:    postgresql.org/message-id/BF332346.D26F%sdavis2@mail.nih.gov

 · 

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: sdavis2@mail.nih.gov, dsilvers@digital-scurf.org
  Subject: Re: table listing queries
  In-Reply-To: <BF332346.D26F%sdavis2@mail.nih.gov>

* 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