PostgreSQL is an open source relational database management system (RDBMS). It is the default database for macOS server.
brew install postgresAfter this, we can test the installation status by checking the version of installed PostgreSQL
postgres -Vpg_ctl -D /usr/local/var/postgres startOr you can start the PostgreSQL server and have it start up at login automatically
brew services start postgresqlpg_ctl -D /usr/local/var/postgres stopTo make it stop starting up automatically at login
brew services stop postgresqlpg_ctl -D /usr/local/var/postgres restartOr if you're using homebrew
brew services restart postgresqlpsqlWe can use psequel a free GUI tool for managing the local and remote PostgreSQL databases
Install psequel using homebrew
brew install psequel