PostgreSQL

-- enable formated output
\x on
 
-- show databass
\l
 
-- show tables
\dt
 
-- show user
\du
 
-- drop database
drop database foo;
 
-- exit
\q
 
-- Display tables size
\dT+
 
-- connect to mytest database
\c db_name
 
-- login to db
sudo -u postgres psql 
 
-- delete database
drop database bar;
 
-- delete user
drop role foo;
 
# Links
https://www3.ntu.edu.sg/home/ehchua/programming/sql/PostgreSQL_GetStarted.html
https://www.niwi.nz/2013/02/17/postgresql-database-table-indexes-size/ - SHOW DATABASE, TABLE AND INDEXES SIZE ON POSTGRESQL
https://www.postgresql.org/docs/9.0/static/app-vacuumdb.html
https://www.postgresql.org/docs/9.1/static/app-reindexdb.html