###安裝sql
經過brew安裝post
brew install postgresql
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
###建立用戶postgresql
createuser username -P
###鏈接code
psql -U username -h 127.0.0.1
###中止postgresqlserver
pg_ctl -D /usr/local/var/postgres stop -s -m fast