I recently had to connect to a Postgres database on the network to perform some simple administrative tasks. However, the Windows machine I had did not have Postgres installed.
As I only needed the “psql” utility to connect and query the database, and not the entire database engine, I was reluctant to install Postgres on the machine. I contemplated of installing other graphical clients, but it was still too heavy for such a simple task I needed to do.
So what better solution than to use the official psql utility instead?
I downloaded a zip archive of all the Postgres binaries from the official website. From there, I extracted the “bin” folder onto my local file system, and added its absolute path to the “Path” variable under the Windows User/System Variables.
A quick restart of the command prompt proved that I had psql installed! Using the –help flag showed me all the possible options and variables I could use with the utility.
Problem solved 🙂