4

As mentioned in the title, I cannot connect to my Heroku Postgres database.

When I run the command to connect, this is the message that is returned.

heroku pg:psql postgresql-metric-xxxxx --app app-name
--> Connecting to postgresql-metric-xxxxx
 !    The local psql command could not be located. For help installing psql, see
 !    https://devcenter.heroku.com/articles/heroku-postgresql#local-setup

However I have already installed PostgreSQL in my system running Windows 10.

1
  • Can you run the psql command locally? Commented Dec 12, 2018 at 20:12

4 Answers 4

3

Remember to update your PATH environment variable to add the bin directory of your Postgres installation. The directory will be similar to this: C:\Program Files\PostgreSQL<VERSION>\bin. If you forget to update your PATH, commands like heroku pg:psql won’t work.

Sign up to request clarification or add additional context in comments.

Comments

2

In order to connect to postgresql, you still need the postgresql client installed locally.

On a mac, you can install it with the brew install postgresql command.
On windows, you can find installation links here.
On linux, it really depends on your distribution. But the apt-get install postgresql command is probably what you're looking for.

Comments

0

Maybe "pqsl" not in the PATH so run

PATH=%PATH%;C:\Program Files\PostgreSQL\9.2\bin

Comments

0

at first time installation even if you add the 'path it will not load in the terminal if that is the case just restart the terminal by closing and reopening

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.