Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

/usr/bin/psql

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 stackoverflow.com 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

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.