PGSERVICEFILE as part of a normal connection string

Torsten Förtsch <tfoertsch123@gmail.com>

From: Torsten Förtsch <tfoertsch123@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2024-11-18T20:21:56Z
Lists: pgsql-hackers

Attachments

Hi,

I like to bundle all my database connections in a .pg_service.conf. Over
time I collected a bunch of such service files. A while back I discovered
that the service file can only be specified as an environment variable. It
cannot be given as part of the connection string like

psql "service=$MY_SERVICE servicefile=MY_SERVICE_FILE"

The attached patch allows that.

Regards.
--
Torsten

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. psql: Add variable SERVICEFILE

  2. libpq: Add "servicefile" connection option

  3. libpq: Add TAP test for nested service file

  4. libpq: Fix some issues in TAP tests for service files

  5. docs: Fix column count attribute in table

  6. libpq: Add TAP tests for service files and names