This post documents how to install and manage PostgreSQL using brew package manager for macOS.
To install PostgreSQL using brew, run the following command.
$ brew install postgresql
If you wish to start and stop PostgreSQL, then you do that using following brew commands.
$ brew services stop postgresql $ brew services start postgresql
To get information about your PostgreSQL installation, you can run following brew command.
brew info postgresql
There are time you might forget if you installed PostgreSQL using brew. You can check if PostgreSQL was installed by brew by running following command.
brew list |grep postgres
The brew package manager installs PostgreSQL under following location.
The configuration files as inside following directory.