Install PostgreSQL on Windows (original) (raw)

Last Updated : 15 Jun, 2026

PostgreSQL is an important open-source relational database management system known for its reliability, performance, and advanced features. It is widely used for developing applications, managing large datasets, and supporting enterprise-level systems.

**Prerequisites

Steps to Install PostgreSQL on Windows

There are three crucial steps for the installation of PostgreSQL as follows:

  1. Download PostgreSQL installer for Windows
  2. Install PostgreSQL
  3. Verify the installation

Step 1: Downloading PostgreSQL Installer for Windows

Download the PostgreSQL installer for Windows (x86-64). It is recommended to download the latest stable version available here.

Step 2: Installing the PostgreSQL installer

Once the download is complete, locate the installer file and double-click it to start the PostgreSQL Setup Wizard.

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Install PostgreSQL on Windows

Add PostgreSQL bin Directory to PATH (Optional)

**Example:

C:\Program Files\PostgreSQL\16\bin
  1. Click OK to save the changes.
  2. Open a new Command Prompt and run:
psql --version

If the PATH is configured correctly, PostgreSQL version information will be displayed.

Step 3: Verifying the Installation of PostgreSQL

After installation, you can verify PostgreSQL using the **psql command-line tool.

  1. Open psql from the Windows search bar.
  2. Enter the server details, database name, username, and password when prompted.
  3. Run the following command:
SELECT version();

If PostgreSQL is installed correctly, it will display the installed PostgreSQL version information.

Verifying the Installation of PostgreSQL