Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to update PostgreSQL from my system's version (9.1.5) to the latest release (9.2.3). I've followed the directions on this railscast and am encountering issues.

After installing psql via brew install postgresql I receive successful confirmation of the installation:

Summary /usr/local/Cellar/postgresql/9.2.3: 2824 files, 39M, built in 2.3 minutes

I then init the database via

initdb /usr/local/var/postgres -E utf8

And start the database with

pg_ctl -D /usr/local/var/postgres -l logfile start

However, after running which psql the path has not changed from the system's default version:


Nor has the version number: psql --version

psql (PostgreSQL) 9.1.5

I have a hunch this may have something to do with my bash profile. Has anyone else encountered similar errors?

Please note, I am running Homebrew v0.9.4 on Mountain Lion v10.8.3

share|improve this question

migrated from Mar 23 '13 at 19:09

This question came from our site for professional and enthusiast programmers.

This appears to be an ever-recurring topic. It seems the osx-packagers have screwed up, and failed to remove the old psql binary in /usr/bin. Try renaming it (cd /usr/bin; mv psql psql.OLD) and if /usr/local/var/postgres is in your PATH and contains a psql binary it will be found. If it is not found, you'll need to download and install it separately. – wildplasser Mar 23 '13 at 14:50

Resolved the issue by editing /etc/paths and moving /usr/local/bin above /usr/bin in the file.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .