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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: fix psql \conninfo & \connect when using hostaddr
Дата
Msg-id 20181109011414.GB2652@paquier.xyz
обсуждение исходный текст
Ответ на Re: fix psql \conninfo & \connect when using hostaddr  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: fix psql \conninfo & \connect when using hostaddr  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список 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.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: ON COMMIT actions and inheritance
Следующее
От: Thomas Munro
Дата:
Сообщение: Strange corruption in psql output on mereswine