From 4b99fed7541e330b669fe488a274c0c69490391c Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 18 Dec 2024 14:53:42 +0900 Subject: 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 --- doc/src/sgml/libpq.sgml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 01f259fd0dc..105b22b3171 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -2530,6 +2530,26 @@ char *PQport(const PGconn *conn); + + PQservicePQservice + + + + Returns the service of the active connection. + + +char *PQservice(const PGconn *conn); + + + + + returns NULL if the + conn argument is NULL. + Otherwise, if there was no service provided, it returns an empty string. + + + + PQttyPQtty -- cgit v1.2.3