Installing PostgreSQL on Mac 10.6 (Snow Leopard)

| posted in: life 


These steps will install PostgreSQL in /usr/local.

To stop a server running in the background you can type:

/usr/local/pgsql/bin/pg_ctl stop
Now you can create a database. Make sure you are operating as the postgres user, and issue the createdb command.
$ su postgres
Password:
bash-3.2$ cd
bash-3.2$ pwd
/usr/local/pgsql
bash-3.2$ createdb testdb
bash-3.2$
Connect to the database, and start experimenting with SQL commands.
bash-3.2$ psql testdb
psql (8.4.0)
Type "help" for help.

testdb=#

The postgres user account will appear in the fast user switching (FUS) list and as an account on the login screen. To hide the account on the login screen run the following command:

To unhide all accounts:

Author's profile picture

Mark H. Nichols

I am a husband, cellist, code prole, nerd, technologist, and all around good guy living and working in fly-over country. You should follow me on Twitter.