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

前端 未结 10 1111
面向向阳花
面向向阳花 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:30

    In Mac, there is a SQL Shell application already under /Applications/PostgresSQL try that

    Also, you can run /Library/PostgreSQL/11/scripts/runpsql.sh

    0 讨论(0)
  • 2021-02-05 05:31

    It appears that you installed Heroku's Postgres.app, which is a tool intended for throw-away testing and development. Add the contents of the bundle to your PATH by following the instructions in the Postgres.app documentation - see "command line tools".

    0 讨论(0)
  • 2021-02-05 05:32

    On macos mojave i've added the following line on my ~/.profile :

    export PATH=$PATH:/Library/PostgreSQL/10/bin
    

    the psql command line client lies into this folder. i've used the enterprisedb installer.

    0 讨论(0)
  • 2021-02-05 05:34

    I just experienced the same problem, and solved it by adding export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin to .bash_profile. Note that this line is version-specific, so be sure to check this line against your current version of Postgres.app.

    0 讨论(0)
提交回复
热议问题