Before you can use PostgreSQL you need to install it, of course. It is possible that PostgreSQL is already installed on your computer, either because it was included in your operating system distribution or because the system administrator already installed it. If that is the case, you should obtain information from the operating system documentation or your system administrator about how to access PostgreSQL.
PostgreSQL can be installed by any unprivileged user; no superuser (root) access is required. If you are not sure whether PostgreSQL is already installed, you can use the Windows search đȘ to search for âPostgreSQLâ or âPgAdminâ.
To download PostgreSQL, visit https://www.enterprisedb.com/downloads/postgres-postgresql-downloads to download a compatible version with your system.
I will select the latest Windows version for my 64-bit system and download the installer. Currently, the version 16.2 installer takes up 375 MB of storage.
Sometimes, your download may not begin automatically. You can trigger and force the download.
Once your download is complete, double-click the installer to begin the installation. Make sure to allow the application to make changes to your system.
Accept the default installation folder. If youâre on Windows, it will be look like this: C:\Program Files\PostgreSQL\16
PostgreSQL is an open-source relational database management system (RDBMS) known for its robustness, extensibility, and adherence to SQL standards. Installing PostgreSQL involves setting up a server instance that manages the database system and allows clients to connect and interact with the databases it hosts. The server stores and manages the databases and responds to requests from client applications.
Clients interact with the PostgreSQL server using various tools. PgAdmin is a popular graphical user interface (GUI) tool that provides a user-friendly way to manage databases, execute queries, and perform administrative tasks. Additionally, command-line tools like psql offer a text-based interface for interacting with PostgreSQL servers. Clients can use these tools to execute SQL commands, manage databases, and perform various administrative tasks directly from the command line, providing flexibility and efficiency in database management and development workflows.
For this course, we will use all the default components except the stack builder.
Accept the next default storage location for the data directory.
Choose a master password for this installation. This password will be useful whenever you spin up the PostgreSQL server and itâs important that you remember it.
You can select a port for your PostgreSQL server installation to listen on, however, letâs go with the default setting at port 5432.
Accept the default locale and the next steps leading up to the PostgreSQL installation summary.
Click âNextâ to start the installation. You might need to wait for a while for the installation to be completed.
Now that your PostgreSQL installation is complete, you can begin interacting with databases with the psql or PgAdmin tool.
Are you new to analytics or want to gain one of the most important skillset in the future of work? Join our next Data Analytics or Data Science Bootcamps.
After installing PostgreSQL and other tools, you may want to ensure that the Postgres bin directory is added to the system PATH variable. For instance, you may run the psql tool in your Command Prompt and get an error like this:
'psql' not recognized as an internal or external command
That error arises because the Postgres installation directory has not been added to the PATH system variable which allows Windows find executable files using the Command prompt or the Terminal window.
Fret not. The fix is a very simple one.
Step 1
Search for "Environment Variables" in your Windows search box. You can use the shortcut đȘ+S (Windows key + S) to bring up the search box.
Step 2
Open the system environment variables dialog.
Step 3
The System Properties window opens up with multiple tabs such as "Computer Name", "Hardware", "Advanced", "System Protection", and "Remote".
Stay on the "Advanced" tab and look for "Environment Variables" at the bottom. Click to navigate into the "Environment Variables" window.
Step 4
Once in the "Environment Variables" window, locate the System variables section. There's a PATH variable that needs to be modified. Find the PATH variable and double-click on it or click on Edit.
Step 5
Once the Path variables window is open, you will see a list of previous paths that have been added. Here you can highlight a variable, edit, delete or add new ones.
Step 6
Click on "New" to add a new path. Here we will add the bin directory of our PostgreSQL installation. Because we installed the latest version -16 - at the time of writing this, the path to be added will be:
C:\Program Files\PostgreSQL\16\bin\
Ensure to add the path for your own specific version of PostgreSQL installation. It might not be version 16 at the time you are reading this.
Finally, click OK to accept all the new configurations. To check that the fix works, you can run the psql code in your Command prompt or Terminal window.
Knowledge of SQL is one of the most sought after analytical skills.
1. Dive into our online data bootcamp! Learn at your own pace with our expert-led virtual programs designed to fit into your schedule. Become a qualified data expert in just 4 months and unlock your potential and land your dream career.
2. Learn more about our Data BootCamp programs by reading the testimonials of our graduates. Click HERE to access the testimonials.
3. You can also sign up for 1:1 personal tutoring with an expert instructor or request other solutions that we provide, which include data research, tech skill training, data products, and application development. Click HERE to begin.
4. Get in touch with us for further assistance from our team OR via email at servus@resagratia.com or our Whatsapp Number via +2349042231545.
Empowering individuals and businesses with the tools to harness data, drive innovation, and achieve excellence in a digital world.
Copyright 2025Resagratia. All Rights Reserved.