DEV Community

ADEKOLA Abdwahab
ADEKOLA Abdwahab

Posted on

4 2

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more