pgsql: psql: Show IP address in \conninfo

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: psql: Show IP address in \conninfo
Date: 2018-11-19 17:34:50
Message-ID: E1gOnRi-0000f0-QU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-11-19 17:43:37 pgsql: Postpone LLVM-related uses of AC_CHECK_DECLS.
Previous Message Robert Haas 2018-11-19 17:13:23 pgsql: Reduce unnecessary list construction in RelationBuildPartitionDe