Why does PostgreSQL's \dt show only public schema tables?
I have created a new schema in my PostgreSQl database with psql:
CREATE SCHEMA my_schema;
But when I issue the \dt
command, I see o开发者_运维问答nly the tables that are in the public
schema. However, I can access all the tables in my_schema
with my_schema.table_name
.
How can I see all the tables from all the schemas in psql?
For your schema (note the period after the schema name):
\dt my_schema.
Or:
SET search_path TO my_schema, public;
\dt
For all schemas:
\dt *.
精彩评论