How to set Postgres path variable on Windows 10

first, you have to set the path for this go to program files search for PostgreSQL folder then a folder come click on it then you will see bin folder click on there where the arrow is pointing you will get the path like this C:\Program Files\PostgreSQL\13 copy it enter image description here

then left-click on this PC, Click on properties Click on the advance system setting on your left hand side a prompt is open then click on an environment variable enter image description here

Click on the path click on edit then click on new then paste this C:\Program Files\PostgreSQL\13 enter image description here

your environment is set then go to cmd type psql -U Postgres then type the password boom done


The PATH contains directories, not the actual executable.

And programs are installed in c:\Program Files not c:\Windows\Program Files.

So you need to add c:\Program Files\PostgreSQL\9.6\bin to the path.