From PostgreSQL wiki
Jump to: navigation, search

Homebrew is a package manager for Mac OS X that builds software from its source code. It includes a version of PostgreSQL packaged by what it refers to as a formula. This type of installation might be preferred by people who are comfortable using the command line to install programs, such as software developers.

Typical use looks like

$ brew install postgresql

This install the command line console (psql) as well as the server, if you'd like to create your own databases locally. Run the following to start the server and login to it (it basically sets up a single "admin" user with your username, so that's who you'll be logged in as.

$ brew services start postgresql
$ psql postgres

You can see what other versions are available by running

$ brew search postgres

You can see which version the current latest will be by running

$ brew edit postgresql

Notes on Homebrew: