pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Show IP address in \conninfo
Date: Mon, 19 Nov 2018 17:34:50 +0000
Message-ID: <E1gOnRi-0000f0-QU@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1gOnRi-0000f0-QU@gemulon.postgresql.org>
Permalink:  ../E1gOnRi-0000f0-QU@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gOnRi-0000f0-QU@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: psql: Show IP address in \conninfo
  In-Reply-To: <E1gOnRi-0000f0-QU@gemulon.postgresql.org>
  References: <E1gOnRi-0000f0-QU@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox