Why can't I add PostgreSQL to my path? Why can't I add PostgreSQL to my path? postgresql postgresql

Why can't I add PostgreSQL to my path?


Try adding this line to your .bash_profile:

export PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"

and remove or comment out the previous reference.


I had this problem too, so instead of adding this to my path in .bash_profile:

export PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"

which is what had been recommended, I added

export PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH"

instead. The '9.3' is replaced by your own version.

I verified it afterwards using

which psql

And it found my version, whereas before it reported nothing.

I then then created a test database with

createdb test

This worked like a charm.


If you are using zsh, try this line in your .zshrc and then restart the terminal

export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin