Skip to main content

Installing PostgreSQL

Installing PostgreSQL on Windows is a straightforward process. Here is a tutorial on how to do it:
  1. Download the latest version of the PostgreSQL installer for Windows from the official website: https://www.postgresql.org/download/windows/

  2. Run the installer by double-clicking on the downloaded file. The installation process will begin and you will be prompted to select the components you want to install. You can leave the default options selected.

  3. Select the destination folder where you want to install PostgreSQL. You can leave the default option selected.

  4. Select the data directory where you want to store the data files. You can leave the default option selected.

  5. Select the locale for the system environment. You can leave the default option selected.

  6. Choose the password for the postgres user.

  7. Select whether you want to run stack builder at the end of the installation.

  8. Click on the Next button to start the installation process.

  9. Once the installation is complete, click on the Finish button to close the installer.

Now that you have successfully installed PostgreSQL on Windows, you can open the pgAdmin application and connect to the database by providing the password you set during the installation. You can also use command line tools such as psql to connect to the database and perform various operations.

You can also setup the environment variable to use postgres commands from command line without specifying the full path.