Re: fix psql \conninfo & \connect when using hostaddr

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Arthur Zakirov <a.zakirov@postgrespro.ru>, Robert Haas <robertmhaas@gmail.com>
Date: 2019-06-13T05:01:39Z
Lists: pgsql-hackers
On Wed, Jun 12, 2019 at 02:44:49PM +0200, Fabien COELHO wrote:
> there is no simple way to know whether hostaddr was set at
> the libPQ level

> A solution could be to have a PQdoestheconnectionuseshostaddr(conn)
> function, but I cannot say I'd be thrilled.

PQconninfo() is the official way to retrieve that.



Commits

  1. Tweak libpq's PQhost, PQhostaddr, and psql's \connect

  2. psql: Show IP address in \conninfo