How to list relations in postgres schema

As of PostgresQL version 11.2 I find that this performs as expected. It lists views and sequences as well, not just tables.

\d schema_2.

If you replace schema_2 with your schema name and leave the dot it appears to work fine.

Some further command instructions are available in a psql connection via \?


I'll clarify since this is the first result of a google search.

\dt schema_2 will not list all the relations for schema_2.

The correct answer is in the comments of the answer.

\dt schema_2.* 

A more thorough answer can be found here, List tables in a PostgreSQL schema


Try this one:

\dt schema_2.

Tags:

Sql

Postgresql