pgsql: libpq: Add service name to PGconn and PQservice() - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: libpq: Add service name to PGconn and PQservice()
Date
Msg-id E1tNn1U-00097E-U4@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix memory leak in pg_restore with zstd-compressed data.
Next
From: Michael Paquier
Date:
Subject: pgsql: psql: Add more information about service name