AlisdairO / pgexercises

PostgreSQL Exercises web site code
Other
400 stars 62 forks source link

[Question] How do I list all the tables? #30

Closed devonhk closed 7 years ago

devonhk commented 7 years ago

I successfully ran psql -U <username> -f clubdata.sql -d postgres -x -q which populated and created the database. But I don't know how to list any of the tables in psql. Running \d or \dt doesn't list any relations. But I am able to query the tables, for example select * from cd.facilities returns all the facilities.

Thanks in advance!

EDIT It turns out I need to run \dt cd.* to find all the tables belonging to the schema. I just loves psql's syntax.