Finding Postgres pg_hba.conf File

The pg_hba.conf file is the PostgreSQL Client Authentication Configuration File, aka the Host Based Authentication File. Depending on your distro/system, it may be installed in different locations. One easy way to find it would be to issue the following command from the psql command line: psql > SHOW hba_file; This command will show you the […]

Getting psql Utility on Windows CLI

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 […]

Inserting Unicode Characters in Postgres

If you deal with foreign country/people names, you may have characters from different sets alongside each other. Putting these characters into a database can be challenging. Below I will highlight how to do this for the Postgres Database. Assuming I have a “country” table with just one field for the name of the country, and […]