PostgreSQL – List all tables of a schema

Run the below sql query to view all the tables of a schema in Postgresql database where schemaname is the name of the schema.

select table_name from information_schema.tables where table_schema= 'schemaname';

You can run the below command from psql tool to list all the tables of a particular schema where ‘schemaname‘ is the name of the schema in mydb database.

mydb=# \dt schemaname.*
See also  PostgreSQL - List materialized views