Use homebrew to install postgres:
$ brew install postgresql
If this is your first time installing Postgres with Homebrew, you'll need to create a database with:
$ initdb /usr/local/var/postgres -E utf8
Lunchy is a helpful gem that will allow you to easily start and stop Postgres.
$ gem install lunchy
to configure lunchy to do so one should use:
$ mkdir -p ~/Library/LaunchAgents
$ cp /usr/local/Cellar/postgresql/9.5.3/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
To start postgres one should use:
$ lunchy start postgres
and to stop it:
$ lunchy stop postgres
$ createuser -s postgres
$ createdb -U postgres EXAMPLE
$ pg_restore -d EXAMPLE -v example.backup
$ psql -U postgres
$ \l