Difference between revisions of "Homebrew"

From PostgreSQL wiki
Jump to: navigation, search
(and what to do next)
(pgsql->psql command utility, thanks to Nick Bauer-Levey <nickbl@gagosian.com>)
Line 9: Line 9:
 
This install the command line console (psql) as well as the server, if you'd like to create your own databases locally.
 
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.
 
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.
<pre>
+
<ore>
 
$ brew services start postgresql
 
$ brew services start postgresql
$ pgsql postgres
+
$ psql postgres
 
</pre>
 
</pre>
  

Revision as of 09:37, 14 September 2019

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. <ore> $ 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: