Listing all databases in postgresql
\list
lists all databases\dt
lists all tables in the current database
Sample of \listwill be displayed as :
postgres=# \list List of databases Name | Owner | Encoding | Collation | Ctype | Access privileges -----------+----------+----------+----------------------------+----------------------------+----------------------- data1 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | postgres | postgres | UTF8 | English_United States.1252 | English_United States.1252 | template0 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres : postgres=CTc/postgres template1 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres : postgres=CTc/postgres (4 rows)