How to set Postgres path variable on Windows 10 How to set Postgres path variable on Windows 10 postgresql postgresql

How to set Postgres path variable on Windows 10


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.


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 itenter image description here

then left-click on this PC,Click on propertiesClick on the advance system setting on your left hand side a prompt is openthen click on an environment variableenter image description here

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

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