DEV Community

ADEKOLA Abdwahab
ADEKOLA Abdwahab

Posted on

psql is not recognised



psql : The term 'psql' 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:18
+ cat mydump.sql | psql restore_test_221122
+                  ~~~~
    + CategoryInfo          : ObjectNotFound: (psql:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command psql was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\psql". See "get-help about_Command_Precedence" for more details.


Enter fullscreen mode Exit fullscreen mode

So this is about a command that is not recognisable from the directory you are.

Image description

From the image above you will see that I am a sub folder inside PostgreSql. Inside that bin folder, there is psql.exe which my command meant to reference.

To correctly refer to this I need to specify it in the command, hence, *.*, which refers to the current working directory, like in the image below.

Image description

From this image, you will that I am now able to proceed as the error did not prompt.

Top comments (0)