Re: PGSERVICEFILE as part of a normal connection string

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Torsten Förtsch <tfoertsch123@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-11-18T20:46:40Z
Lists: pgsql-hackers
On Mon, 2024-11-18 at 21:21 +0100, Torsten Förtsch wrote:
> 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.

+1 for the idea (I didn't test the patch).

Yours,
Laurenz Albe



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