Report inadequate content

Mac, Postgresql in Harecoded

Expand

Installing and configuring PostgreSQL server on Mac

You can use the Fink package system to install postgresql if you are already using Fink (inside a terminal: sudo fink install postgresql and then configure the server).

OR you can install postgresql, with the clean solution offered by Marc Liyanage.

I prefer the 2nd option. If you also choose that, follow carefully the installation instructions and you'll have PgSQL working in minutes.

If you'd like to have 2 scripts for manually starting and stoping the database create the files:

Starting script (pgstart.sh)

su postgres -c "/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l ~/postgres.log start" (line wrapped)

Stop script (pgstop.sh)

su postgres -c "/usr/local/bin/pg_ctl -D /usr/local/pgsql/data stop" You need execute permissions in these scripts [by chmod 755 pgstart.sh pgstop.sh] and you can invoke them with ./pgstop.sh and ./pgstart.sh commands within the terminal. Note that the postgres password will be prompted.