Reputation: 93
In a pSQL session (linux server), the command \dn displays the schemas in a database. Is there any command that could display tables just under a particular schema, say xyz?
Thanks,
Upvotes: 1
Views: 435
Reputation: 10054
\dt
is used to list tables. By default it will list those in the current schema.
You can, however, pass a pattern to it. In your case, you want to do:
\dt xyz.
This will list all tables in the xyz
schema.
Here's some further things you can do with it:
\dt *.
user
in their name: \dt *user*
user
in their name in all schemas: \dt *.*user*
Upvotes: 1
Reputation: 321
The "\z" COMMAND use to list of tables when inside the interactive psql session.
# psql -d mcdb -U admin -p 5555
mcdb=# \z
Upvotes: 0