Christopher B. Browne's Home Page

2. Using PostgreSQL URIs

There are a number of ways of configuring connecting to a PostgreSQL database, as documented Database Connection Control Functions

I have been migrating my thinking, over the last number of years, to use URIs wherever possible, as that provides a singular structure that tends to be able to passed easily as strings.

I have found one scenario that has been a "pain in the neck", namely when there was some confusion as to whether the database server supported hosts versus Unix Domain Sockets, and did a Blog Post: PostgreSQL URIs versus Unix Domain Sockets.

Contact me at