I just installed Postgres.app on my Mac but it won't work properly. I finished the installation and the app icon is on the menu bar and it says it is listening on port 5432, however, that is what happens if I try to run it from the command-line:
~ $ psql zsh: correct 'psql' to 'sl' [nyae]? n zsh: command not found: psql
I had previously installed PostgreSQL via Homebrew but removed it before installing Postgres.app. I am running Mac OS X Lion.
I appreciate any help, I really want to have PostgreSQL running on my machine.
Check Postgres Version from SQL Shell Type the following SQL statement within the prompt to check the current version: SELECT version(); The resulting output provides the full version and system information for the PostgreSQL server.
open command prompt first ( Winkey+R ), then type C:\Program Files\PostgreSQL\10\bin\psql.exe , then press enter and type in password.
The psql
binary for Postgres.app is inside the application bundle and you'll have to add the appropriate directory to your PATH
. From the fine manual:
Configure your
$PATH
Postgres.app includes many command line tools. If you want to use them, you must configure the
$PATH
variable.If you are using bash (default shell on OS X), add the following line to
~/.bash_profile
:export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
[...]
So adjust your PATH
setting in your zsh config files to include the
Contents/Versions/latest/bin
directory inside your Postgres.app
bundle.
I'm reading this as of April 2014 and the directory you must include in your path as far as my Postgres app is concerned is slightly different.
I had to include this:
PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH"
I can now run psql in my terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With