]> git.ipfire.org Git - thirdparty/postgresql.git/commit
libpq: Remove PQservice()
authorMichael Paquier <michael@paquier.xyz>
Wed, 9 Jul 2025 03:46:18 +0000 (12:46 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 9 Jul 2025 03:46:18 +0000 (12:46 +0900)
commitfc3edb52fbb9b773442ce0a89116f893aaa766af
tree5428cbc4c2b01609843dcc930cc627265222cb60
parent075554ec6c0c8ef9fca38086624d27d8df2a27d7
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
doc/src/sgml/libpq.sgml
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/common.h
src/bin/psql/prompt.c
src/interfaces/libpq/exports.txt
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/libpq-fe.h