agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: libpq: Fix "servicefile" after fallback to system service file
Date: Thu, 04 Jun 2026 06:21:21 +0000
Message-ID: <E1wV1SD-000zyg-2x@gemulon.postgresql.org> (raw)
libpq: Fix "servicefile" after fallback to system service file
When "servicefile" is specified in a connection string but the requested
service is not found in this file, libpq falls back to a default file,
pg_service.conf in PGSYSCONFDIR. The "servicefile" option was missing
an update in this case, causing an incorrect value to be reported,
impacting SERVICEFILE in psql, for example.
An extra update of the option is added in this commit, based on the
actual file where the service name has been found. A test is added to
cover this problem.
Oversight in 092f3c63efc6.
Author: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/59DD1652-4EB5-449B-8DE3-959F06561A96@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/90354030b8fceecef9a1908fdefcccf0e02823fb
Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 12 ++++++++++++
src/interfaces/libpq/t/006_service.pl | 8 ++++++++
2 files changed, 20 insertions(+)
Message-ID: <E1wV1SD-000zyg-2x@gemulon.postgresql.org>
Permalink: ../E1wV1SD-000zyg-2x@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wV1SD-000zyg-2x@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: libpq: Fix "servicefile" after fallback to system service file
In-Reply-To: <E1wV1SD-000zyg-2x@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox