Open In App

PostgreSQL – Installing PostgreSQL Without Admin Rights on Windows

 If you are a part of a corporation, it is highly unlikely that you have the admin privileges to install any external software. But the curious souls that all software developers are, in this article, we will see the detailed process of installation of PostgreSQL without having administrator rights on our Windows machine.

Installation:

Follow the below steps to install PostgreSQL:



PostgreSQL zip binaries after extraction

Configuring User Environment Path Variable

Well, Congratulations!!. At this point, we have successfully configured PostgreSQL in your windows system. 

Verify Installation:

To verify if it is installed properly, use the following commands. 



The below command checks the PostgreSQL server version:

postgres -V

Check PostgreSQL Server Version

The below command checks the PostgreSQL client version:

psql -V

Check PostgreSQL Client Version

Create a DB and associate a user in PostgreSQL:

Now it is time to initialize the database and associate a user to this. The database will be initialized at the location given by us (data folder in this case). The command for this is as follows:

initdb -D D:\PostgreSQL\pgsql\data -U postgres -E utf8

The following are the references for the command line arguments which will help for better understanding –

PostgreSQL initdb

pg_ctl -D D:\PostgreSQL\pgsql\data -l logfile start

Start Database Server

pgAdmin4 Home Page

pg_ctl -D D:\PostgreSQL\pgsql\data -l logfile stop

Your basic setup of PostgreSQL is now done. However, if you want to use additional PGSQL functions like vacuuming, upgrade, restore etc then you might need to setup the binary paths for it . For this, go to File -> Preferences. Now scroll down to Paths and click Binary Paths. Specify all the three paths as the directory of PgSQL installation bin folder. Refer to the below figure for setting up the binary paths.

Article Tags :