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

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Arthur Zakirov <a.zakirov@postgrespro.ru>, Robert Haas <robertmhaas@gmail.com>
Date: 2018-11-17T14:32:10Z
Lists: pgsql-hackers
On Sat, 17 Nov 2018, Alvaro Herrera wrote:

>> /* ----------
>>  * getHostaddr -
>>  * Fills 'host_addr' with the string representation of the currently connected
>>  * socket in 'conn'.
>>  * ----------
>>  */
>> static void
>> getHostaddr(PGconn *conn, char *host_addr, int host_addr_len)

> Fabien, are you planning to fix things per Arthur's review?

Yep, I am.

I will not do the above though, because the PQgetHostaddr API would differ 
from all other connection status functions (PQgetHost, PQgetUser...) which 
are all "char * PQget<Something>(PGconn * conn)"

-- 
Fabien.


Commits

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

  2. psql: Show IP address in \conninfo