pgsql: psql: Show IP address in \conninfo - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: psql: Show IP address in \conninfo
Date
Msg-id E1gOnRi-0000f0-QU@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
psql: Show IP address in \conninfo

When hostaddr is given, the actual IP address that psql is connected to
can be totally unexpected for the given host.  The more verbose output
we now generate makes things clearer.  Since the "host" and "hostaddr"
parts of the conninfo could come from different sources (say, one of
them is in the service specification or a URI-style conninfo and the
other is not), this is not as silly as it may first appear.  This is
also definitely useful if the hostname resolves to multiple addresses.

Author: Fabien Coelho
Reviewed-by: Pavel Stehule, Arthur Zakirov
Discussion: https://postgr.es/m/alpine.DEB.2.21.1810261532380.27686@lancre
        https://postgr.es/m/alpine.DEB.2.21.1808201323020.13832@lancre

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6e5f8d489acccdc50a35a1b7db8e72b5ad579253

Modified Files
--------------
doc/src/sgml/libpq.sgml           | 30 ++++++++++++
src/bin/psql/command.c            | 82 +++++++++++++++++++++++++-------
src/interfaces/libpq/exports.txt  |  1 +
src/interfaces/libpq/fe-connect.c | 98 +++++++++++++++++++++++++++++----------
src/interfaces/libpq/libpq-fe.h   |  1 +
src/interfaces/libpq/libpq-int.h  |  1 +
6 files changed, 172 insertions(+), 41 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Reduce unnecessary list construction inRelationBuildPartitionDe
Next
From: Tom Lane
Date:
Subject: pgsql: Postpone LLVM-related uses of AC_CHECK_DECLS.