#Postgres ##Install
brew install postgresql
brew services start postgresql
initdb /usr/local/var/postgres - create new database cluster
/usr/local/Cellar/postgresql/<version>/bin/createuser -s postgres
##To start server at startup
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
##login
psql -U postgres -h localhost