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