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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: fix psql \conninfo & \connect when using hostaddr
Date: 2018-11-08 15:13:31
Message-ID: 20181108151331.3xgfc6kpvjaynz3d@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2018-Nov-08, Tom Lane wrote:

> For the record --- I just checked, and pgindent will not mess up code like
> if (condition)
> /* comment here */
> do_something();
> at least not as long as the comment is short enough for one line.
> (If it's a multiline comment, it seems to want to put a blank line
> in front of it, which is not very nice in this context.)

Yeah, those blank lines are what I've noticed, and IMO they look pretty

> Visually, however, I think this is better off with braces because
> it *looks* like a multi-line if-block. The braces also make it
> clear that your intent was not, say,
> while (some-mutable-condition)
> /* skip */ ;
> do_something_else();

Right, that too. Fortunately I think compilers warn about mismatching
indentation nowadays, at least in some cases.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2018-11-08 15:19:49 Re: [HACKERS] [PATCH] Generic type subscripting
Previous Message Tomas Vondra 2018-11-08 15:06:49 Re: shared-memory based stats collector