List all tables in postgresql information_schema

littleK picture littleK · Feb 16, 2010 · Viewed 377.9k times · Source

What is the best way to list all of the tables within PostgreSQL's information_schema?

To clarify: I am working with an empty DB (I have not added any of my own tables), but I want to see every table in the information_schema structure.

Answer

RodeoClown picture RodeoClown · Feb 16, 2010

You should be able to just run select * from information_schema.tables to get a listing of every table being managed by Postgres for a particular database.

You can also add a where table_schema = 'information_schema' to see just the tables in the information schema.