The good thing is that Apple decides to bundle PostgresSQL 8.4 with OSX Lion which cause conflict if you install Postgres 9.x using
Macport. You will likely bump into following error:
$ psql -d postgres -U postgres psql: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
So what’s going wrong here? Because the stock postgresql has higher precedence in
To fix this, simply make
/usr/local/bin highest precendence for
Local scope (recommended):
/etc/paths and move your
/usr/local/bin to the top.
$ sudo nano /etc/paths /usr/local/bin /usr/bin /bin /usr/sbin /sbin