Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

\uD83D\uDCD8 Instructions

To install psql (PostgreSQL client) on Windows, you can follow these steps:

  1. Download PostgreSQL Installer:

    • Visit the official PostgreSQL download page: PostgreSQL Downloads

    • Download the installer for the version that you want to install. Choose the version that matches your system architecture (32-bit or 64-bit).

  2. Run the Installer:

    • Double-click the downloaded installer to run it.

    • Follow the on-screen instructions to install PostgreSQL. During the installation, you'll be prompted to choose components to install. Make sure to include the option for the command-line tools, which includes psql.

  3. Configure PostgreSQL:

    • During the installation, you will be prompted to set a password for the default database user (usually 'postgres'). Remember this password, as you'll need it later to connect to the PostgreSQL server.

  4. Complete the Installation:

    • Finish the installation process by following the remaining prompts. The installer will create a PostgreSQL service and configure the necessary environment variables.

  5. Add bin Directory to System Path:

    • To use psql from the command prompt without specifying the full path, you may want to add the PostgreSQL bin directory to your system's PATH environment variable. The default location is typically something like C:\Program Files\PostgreSQL\{version}\bin.

  6. Test psql Installation:

    • Open a new command prompt and type the following command to launch psql:

      psql -U postgres

      Replace "postgres" with the actual PostgreSQL username you specified during installation.

    • You will be prompted for the password you set during installation. Enter the password to connect to the PostgreSQL server.

    • If everything is set up correctly, you should see the psql prompt, indicating that you are connected to the PostgreSQL server.

That's it! You have now installed psql on your Windows system. You can use this command-line tool to interact with PostgreSQL databases.

Filter by label

There are no items with the selected labels at this time.

  • No labels