When I do a \dt
in psql I only get a listing of tables in the current schema (public
by default).
How can I get a list of all tables in all schemas or a particular schema?
When I do a \dt
in psql I only get a listing of tables in the current schema (public
by default).
How can I get a list of all tables in all schemas or a particular schema?
In all schemas:
In a particular schema:
It is possible to use regular expressions with some restrictions
Alternatively to
information_schema
it is possible to usepg_tables
:You can select the tables from
information_schema
For those coming across this in the future:
If you would like to see a list of relations for several schemas: