List tables in PostgreSQL database

Query below lists all tables in a PostgreSQL database.


select table_schema, 
from information_schema.tables
where table_schema not in ('information_schema', 'pg_catalog')
      and table_type = 'BASE TABLE'
order by table_schema,


  • table_schema - schema name
  • table_name - table name


  • One row represents one table in the database
  • Scope of rows: all tables in the database
  • Ordered by schema and table name

Sample results

You could also get this

Get this interactive HTML data dictionary in minutes with Dataedo.

See live HTML data dictionary sample

Try for free

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
There are no comments. Click here to write the first comment.