PostgreSQL cheat sheet

Ubuntu install lastest Postgres:

sudo apt-get install postgresql postgresql-contrib

Create user with password, admin and echo:

createuser -P -s -e <user_name>`

Check connection under localhost:

psql -h localhost -U <user_name> --password --dbname=postgres

then input password