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

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Noah Misch <noah@leadboat.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Arthur Zakirov <a.zakirov@postgrespro.ru>, Robert Haas <robertmhaas@gmail.com>
Date: 2019-06-14T21:31:53Z
Lists: pgsql-hackers
On 2019-May-27, Noah Misch wrote:

> Other than that, the \connect behavior change makes sense to me.  However,
> nothing updated \connect documentation.  (Even the commit log message said
> nothing about \connect.)

I added this blurb to the paragraph that documents the reusing behavior:

        If <literal>hostaddr</literal> was specified in the original
        connection's <structname>conninfo</structname>, that address is reused
        for the new connection (disregarding any other host specification).

Thanks for reporting these problems.  I'm going to push this shortly.
We can revise over the weekend, if there's need.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

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

  2. psql: Show IP address in \conninfo