From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: libpq: Remove PQservice()
Date: Wed, 09 Jul 2025 03:46:45 +0000
Message-ID: <E1uZLlc-005MHv-2x@gemulon.postgresql.org> (raw)
libpq: Remove PQservice()
This routine has been introduced as a shortcut to be able to retrieve a
service name from an active connection, for psql. Per discussion, and
as it is only used by psql, let's remove it to not clutter the libpq API
more than necessary.
The logic in psql is replaced by lookups of PQconninfoOption for the
active connection, instead, updated each time the variables are synced
by psql, the prompt shortcut relying on the variable synced.
Reported-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20250706161319.c1.nmisch@google.com
Backpatch-through: 18
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fef6da9e9c8790fa915942af2ada190c33fcf98c
Modified Files
--------------
doc/src/sgml/libpq.sgml | 20 --------------------
src/bin/psql/command.c | 7 ++++++-
src/bin/psql/common.c | 35 +++++++++++++++++++++++++++++++++++
src/bin/psql/common.h | 1 +
src/bin/psql/prompt.c | 8 ++++++--
src/interfaces/libpq/exports.txt | 11 +++++------
src/interfaces/libpq/fe-connect.c | 8 --------
src/interfaces/libpq/libpq-fe.h | 1 -
8 files changed, 53 insertions(+), 38 deletions(-)
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: Remove PQservice()
In-Reply-To: <E1uZLlc-005MHv-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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox