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

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Fabien COELHO <coelho@cri.ensmp.fr>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2018-11-08T12:40:15Z
Lists: pgsql-hackers
On 2018-Nov-08, Arthur Zakirov wrote:

> On 07.11.2018 20:11, Pavel Stehule wrote:
> > st 7. 11. 2018 v 15:11 odesílatel Arthur Zakirov
> > <a.zakirov@postgrespro.ru <mailto:a.zakirov@postgrespro.ru>> napsal:
> > >     I think there is lack of necessary braces here for first if and second
> > >     else branches. This is true for both patches.
> > ?
> 
> I just meant something like this (additional "{", "}" braces):

We omit braces when there's an individual statement.  (We do add the
braces when we have a comment atop the individual statement, though, to
avoid pgindent from doing a stupid thing.)

-- 
Á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