pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: libpq: Remove PQservice()
2+ messages / 1 participants
[nested] [flat]

* pgsql: libpq: Remove PQservice()
@ 2025-07-09 03:46 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2025-07-09 03:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: libpq: Remove PQservice()
@ 2025-07-09 03:46 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2025-07-09 03:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fc3edb52fbb9b773442ce0a89116f893aaa766af

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-07-09 03:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-09 03:46 pgsql: libpq: Remove PQservice() Michael Paquier <michael@paquier.xyz>
2025-07-09 03:46 pgsql: libpq: Remove PQservice() Michael Paquier <michael@paquier.xyz>

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