how to view all the tables in a database in psql code example Example: show details of table postgres postgres=# \d tablename;