pgsql: libpq: Add service name to PGconn and PQservice()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: libpq: Add service name to PGconn and PQservice()
Date: 2024-12-18 05:55:05
Message-ID: E1tNn1U-00097E-U4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

libpq: Add service name to PGconn and PQservice()

This commit adds one field to PGconn for the database service name (if
any), with PQservice() as routine to retrieve it. Like the other
routines of this area, NULL is returned as result if the connection is
NULL.

A follow-up patch will make use of this feature to be able to display
the service name in the psql prompt.

Author: Michael Banck
Reviewed-by: Greg Sabino Mullane
Discusion: https://postgr.es/m/6723c612.050a0220.1567f4.b94a@mx.google.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4b99fed7541e330b669fe488a274c0c69490391c

Modified Files
--------------
doc/src/sgml/libpq.sgml | 20 ++++++++++++++++++++
src/interfaces/libpq/exports.txt | 1 +
src/interfaces/libpq/fe-connect.c | 11 ++++++++++-
src/interfaces/libpq/libpq-fe.h | 1 +
src/interfaces/libpq/libpq-int.h | 1 +
5 files changed, 33 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-12-18 06:17:13 pgsql: psql: Add more information about service name
Previous Message Tom Lane 2024-12-18 03:31:53 pgsql: Fix memory leak in pg_restore with zstd-compressed data.