Steps to install and run PostgreSQL using Homebrew (Mac OS X) (if you aren't using version 9.1.5, change line 6 with the correct version)
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plistbrew updateinitdb /usr/local/var/postgres -E utf8pg_upgrade -b /usr/local/Cellar/postgresql/9.4.6/bin -B /usr/local/Cellar/postgresql/9.4.6/bin -d /usr/local/var/postgres -D /usr/local/var/postgrescp /usr/local/Cellar/postgresql/9.4.6/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start