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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: fix psql \conninfo & \connect when using hostaddr
Дата
Msg-id 20181108151331.3xgfc6kpvjaynz3d@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: fix psql \conninfo & \connect when using hostaddr  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: fix psql \conninfo & \connect when using hostaddr  (Michael Paquier <michael@paquier.xyz>)
Список 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
bad.

> 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                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: shared-memory based stats collector
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [HACKERS] [PATCH] Generic type subscripting