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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-09 01:14:14
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Nov 08, 2018 at 12:13:31PM -0300, Alvaro Herrera wrote:
> On 2018-Nov-08, Tom Lane wrote:
>> 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.

I don't recall seeing a compiler warning about that, but I do recall
coverity complaining loudly about such things. It is better style to
use braces if there is one line of code with a comment block in my
opinion. And there is no need for braces if there is no comment.

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-11-09 01:16:02 Strange corruption in psql output on mereswine
Previous Message Michael Paquier 2018-11-09 01:10:13 Re: ON COMMIT actions and inheritance