echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - apt-get update
apt-get install postgresql-9.3
ps aux | grep postgres # it has started already sudo -u postgres createuser -s $USER # e.g. $USER=ubuntu createdb mydb # dropdb mydb # to delete the database
psql mydb # start the interactive client to access the database
pgsql normal user prompt mydb=>
pgsql super user prompt mydb
\l or \list # all the current databases \d or \dt # tables in the current database
http://www.linuxscrew.com/2009/07/03/postgresql-show-tables-show-databases-show-columns/ http://killtheyak.com/use-postgresql-with-django-flask/