How to put psql on the path when using Postgres.app on OS X?

前端 未结 10 1109
面向向阳花
面向向阳花 2021-02-05 05:01

I\'ve installed Postgres93 on my Mac. I can open the application, and \"Open psql\" through the app which opens up a command line interface with psql.

However, when I ty

10条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 05:25

    I just had postgres installed and was not able to run the psql command until I ran the following command in my terminal:

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

    Now the terminal knows where to find postgres when I use the psql command.

    Remember to replace the version number '9.5' with your current version.

提交回复
热议问题