PostgreSQL on OS X fast setup
Published on: 07 Jan 2014
Add this line to your bash_profile:
export PGHOST=localhost
This way you can avoid specifying the host (“-h localhost”) in each instruction in the shell, or having to add it to the development (“host: localhost”) section in your database.yml (if you’re developing with Rails).