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.

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

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

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay