EnterpriseDB (the official provider of Windows binaries) offers standalone ZIP files containing everything you need. This requires no installation wizard and leaves your Windows Registry clean.
Extract the downloaded ZIP file. Inside, you will see a pgsql folder. Move this folder somewhere permanent, like C:\pgsql. Your CLI tools sit right inside C:\pgsql\bin.
3.Add to System PATH:Takes 2 min.
To run tools like psql from any command prompt, add it to your environment variables:
Search for “Environment Variables” in the Windows Start menu.
Click Environment Variables… at the bottom.
Under System variables, select Path and click Edit….
Click New and paste your bin path: C:\pgsql\bin.
Click OK on all windows to save.
4.Verify Installation:Takes 30 seconds.
Open a completely new Command Prompt (cmd) or PowerShell terminal and verify it works by typing: