Skip to main content

Command Palette

Search for a command to run...

How To Download And Install PostgreSQL On A Windows Machine

Updated
2 min read
How To Download And Install PostgreSQL On A Windows Machine
A

I am a technical writer and software engineer

This is a beginner’s guide to downloading and installing PostgreSQL on a Windows machine. We will be installing PostgreSQL 15.3 in this tutorial.

How to download PostgreSQL

#1 Visit the PostgreSQL website

Go to the PostgreSQL website and click Download.

Choose the Windows option.

#2 Select Download Installer

#3 Select a version

On this page, you’ll find different versions. Select the most recent version. In this case, 15.3 PostgreSQL Version for Windows.

The download will begin shortly.

#4 Open the installer file

Once the download process is complete, double-click the installer file and click Next to install.

#5 Update installation location

You can change the installation folder if need be. Otherwise, leave it as it is. Click Next

#6 Select your components

Choose the components you’ll need to create your database, and click Next.

#7 Update Data Directory

You may or may not change the data location. Click Next

#8 Enter the password

Add a password for the super user. Remember the password since you’ll need it to connect your database. Click Next.

#10 Leave the port number as it is. Click Next

#11 Leave the Locale option as it is. Click Next

#12 You can go through the Pre Installation Summary and click Next

#13 Install PostgreSQL

Click Next to install PostgreSQL on your Windows machine.

#14 Uncheck the Stack Builder prompt and click Finish

Verification

We can now use the terminal to verify PostgreSQL installation.

#1 Press the Windows button on your keyboard, and scroll down to the PostgreSQL folder. Click on it, then on SQL SHELL

Alternatively, you can type SQL in the search bar, and click Open.

#2 Press Enter until it prompts you to enter your password

You are now inside Postgres Database.

#3 Input the command SELECT version()

It will display the version of the PostgreSQL database on your machine.

You can now create databases, and tables, and add information. For example, we can list databases using the \l command.

More from this blog

withallan

17 posts

Documenting my software development journey