If, after installing PostgreSQL, you face “psql not recognized as an internal or external command” error when you try to run psql from the command prompt, then most probably all you need to do to solve this problem is to add Postgres’s bin directory to the PATH system variable (the PATH is a system variable which allows Windows with the help of the Command prompt or the Terminal window find executables).
In this blog post, we’ll share seven simple steps that describe how to add the folder to the Windows 10 PATH variable.