0

After

heroku login 

I'm trying to run in cmd:

echo "select * from public.table limit 2;" | heroku pg:psql -app "my-app::DATABASE_URL" 

and get error: "The local psql command could not be located"

The local postgres installed in : C:\Program Files\PostgreSQL\14\bin when I try to set path

set PATH=%PATH%;C:\Program Files\PostgreSQL\14\bin 

or

setx PATH "PATH%;C:\Program Files\PostgreSQL\14\bin" 

I get error like this:

C:\Program : The term 'C:\Program' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:17 + set PATH=%PATH%;C:\Program Files\PostgreSQL\14\bin + ~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Program:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException 

How I can to run this ?

3
  • You need to add that directory to your PATH. Please see the marked duplicates. Commented Nov 1, 2022 at 11:11
  • but can't to set this directory to path Commented Nov 1, 2022 at 12:07
  • Please see the two new duplicates that are specific to PowerShell Commented Nov 1, 2022 at 12:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.