Configure PostgreSQL portable without admin rights

Download ZIP from https://www.enterprisedb.com/download-postgresql-binaries

Extract it to desired location ( eg. C:\PostgreSQL ) and open your User Environments. Then Create a new variable named PGDATA and give your desired data location as value. (eg. PGDATA : C:\PostgresSQL\data)

Then open cmd into PostgreSQL directory (eg. C:\PostgreSQL\ ). You should execute first 3 commands to initiate your Postgres DB. Following 3 commands are to start, stop or view status. The words in italics are user settings and can be entered as per the user choice, provided that you understand what you’re doing.
pg_ctl.exe init
createuser.exe -d -P -s --replication admin
createdb.exe -O admin test_db
pg_ctl.exe -D "..\data" -l thislog start
pg_ctl.exe status
pg_ctl.exe -D "..\data" stop

After this your DB location is http://localhost:5432/test_db.

If you’re configuring it with SQL Workbench, then download the JDBC driver from https://jdbc.postgresql.org/download.html and configure it with SQL Workbench. If this link doesn’t work then please visit https://www.sql-workbench.eu/manual/jdbc-setup.html for latest link. The connection in SQL workbench will be jdbc:postgresql://localhost:5432/test_db

Then use SELECT VERSION(); SQL statement to check your PostgreSQL version.