PostgreSQL Installation Guide for Windows

Jun 28, 2024

PostgreSQL Installation Guide for Windows

Downloading PostgreSQL

  1. Google Search: Search for 'PostgreSQL download'.
  2. First Link: Click on the first search result.
  3. Download Options: Different options for various systems.
  4. Select Windows: Choose Windows for the download.
  5. 64-bit Only: Ensure to download the 64-bit version as 32-bit is not supported.
    • The download will start automatically after some time.

Installing PostgreSQL

  1. Run Setup: Double click on the setup file.
    • Click on 'Next' through initial setup prompts.
  2. Set Password: Input and remember the password for the database.
    • This password is crucial for accessing the database later.
  3. Default Port: Leave the default port number (5432) unchanged.
  4. Database Cluster: Accept default settings for database cluster location.
    • Click 'Next' and proceed with the installation.
  5. Final Steps: Uncheck the option for 'Stack Builder' install and finish the setup.

Installing pgAdmin

  1. Download pgAdmin: Search for 'pgAdmin 4' and select the latest version (e.g., August 15th release).
    • The file size is 168 MB.
  2. Run Setup: Double-click the downloaded pgAdmin executable to start the setup wizard.
    • Accept the terms and click 'Next'.
    • Accept default installation location (C drive).
  3. Complete Setup: Proceed with the installation steps and finish.

Using pgAdmin

  1. Open pgAdmin: Search for 'pgAdmin 4' in the Windows search bar and open the application (not the installer).
  2. Enter Password: Use the password set during PostgreSQL installation.
    • Connect to the database server by inputting the same password.
  3. Access Servers: You will see servers for PostgreSQL 12 and PostgreSQL 14. Use PostgreSQL 14.
    • Enter the password again to connect.
  4. Create Database: Right-click to create a new database. Further steps on creating tables and running queries will be discussed in the next session.

Next Steps

  • Creating Databases: How to create databases in PostgreSQL using pgAdmin.
  • Tables & Queries: Basic operations for table creation and running queries.