How To Access PostgreSQL Globally in Windows

If you are getting the error below after installing PostgreSQL don’t panic, just follow along with this tutorial and it’s gonna be solved.

This tutorial is simplified to help everyone to know how to add PostgreSQL to user or system variable(path) wh…


This content originally appeared on DEV Community and was authored by Emmanuel Larbi

If you are getting the error below after installing PostgreSQL don’t panic, just follow along with this tutorial and it’s gonna be solved.

Header image

This tutorial is simplified to help everyone to know how to add PostgreSQL to user or system variable(path) which can be accessed globally with minimum stress.

Let’s begin!

Normally, you will have to navigate to your PostgreSQL bin directory to copy the path which takes a while. Instead, I will provide the path for you to make everything quick and easy.

Path to postgresql bin directory —

C:\Program Files\PostgreSQL\14\bin

NB: Change \14\ to the version of Postgres you have installed

Step 1

Copy the path to your Postgres bin directory provided above.

Step 2

Press the windows start button and search for env then click open

Search

Step 3

Click on Environment Variables

env

Step 4

Double click on Path

Path

Step 5

Click on New

New Path

Step 6

Paste the [PostgreSQL bin](C:\Program Files\PostgreSQL\14\bin) path you copied. Then click ok recursively to close all windows

Paste path

Step 7

Close all instances of your terminal then reopen it.

NB: If you are using terminals in VS Code Editor, you will have to restart VS Code Editor for the changes to take effect

Postgres Accessed Globally

Step 8

You are done

And now you can log in to Postgres without using the default psql shell.

Hope this solves your issue about using Postgres globally.

Thank You


This content originally appeared on DEV Community and was authored by Emmanuel Larbi


Print Share Comment Cite Upload Translate Updates
APA

Emmanuel Larbi | Sciencx (2022-06-17T15:18:24+00:00) How To Access PostgreSQL Globally in Windows. Retrieved from https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/

MLA
" » How To Access PostgreSQL Globally in Windows." Emmanuel Larbi | Sciencx - Friday June 17, 2022, https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/
HARVARD
Emmanuel Larbi | Sciencx Friday June 17, 2022 » How To Access PostgreSQL Globally in Windows., viewed ,<https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/>
VANCOUVER
Emmanuel Larbi | Sciencx - » How To Access PostgreSQL Globally in Windows. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/
CHICAGO
" » How To Access PostgreSQL Globally in Windows." Emmanuel Larbi | Sciencx - Accessed . https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/
IEEE
" » How To Access PostgreSQL Globally in Windows." Emmanuel Larbi | Sciencx [Online]. Available: https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/. [Accessed: ]
rf:citation
» How To Access PostgreSQL Globally in Windows | Emmanuel Larbi | Sciencx | https://www.scien.cx/2022/06/17/how-to-access-postgresql-globally-in-windows/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.