SQL for listing the tables in a specific database

From: Lonni J Friedman <netllama(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: SQL for listing the tables in a specific database
Date: 2010-01-06 22:46:19
Message-ID: 7c1574a91001061446x49968b06q3ccec958ede2bf2d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Greetings,
I've been googling for a while, and I can't seem to find a solution.
What I'd like to do is obtain a list of the tables that are part of a
specific database instance. Google has provided me with numerous ways
of listing every table across all the database instances, but not a
way to isolate the dataset to just one database.

Here's what I've found thus far, which lists every table from every database:

select * from pg_tables
select table_name from information_schema.tables where table_schema = 'public' ;

thanks!

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message John J. Urbaniak 2010-01-06 22:50:54 Re: Error on Vacuum?
Previous Message Tom Lane 2010-01-06 20:15:25 Re: Error on Vacuum?