Add psql to your PATH variable
Using Windows Explorer, locate the executable for psql. This file should be located in the bin/ folder within the directory you specified when installing PostgreSQL. Copy the path to the file psql.exe.
Next, add this path to the PATH variable.
- In the Control Panel, select System > About and click Advanced system settings (or search "edit the system environment variables" in the Windows Menu).
- Click Environment Variables.
- Under System Variables, double-click the Variable "Path" (or select and click Edit).
- In the Edit environment variable dialog box, click New.
- Paste the path into the dialog box.
- Click Ok and then Ok again.