install
This case is installing 9.6. If you remove @9.6
, you will get the latest version of PostgreSQL.
$ brew reinstall postgresql@9.6
$ echo 'export PATH="/usr/local/opt/postgresql@9.6/bin:$PATH"' >> ~/.zshrc
or
$ echo 'export PATH="/usr/local/opt/postgresql@9.6/bin:$PATH"' >> ~/.bashrc
start & stop
$ brew services start postgresql
$ brew services stop postgresql
$ brew services list