Re: mogrify and indent features for jsonb

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: mogrify and indent features for jsonb
Дата
Msg-id 553EBB1C.4040501@dunslane.net
обсуждение исходный текст
Ответ на Re: mogrify and indent features for jsonb  (Petr Jelinek <petr@2ndquadrant.com>)
Ответы Re: mogrify and indent features for jsonb  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 04/27/2015 12:46 PM, Petr Jelinek wrote:
>
> Another thing I noticed now when reading the code again - you should 
> not be using braces when you only have one command in the code-block.
>

There's one exception I, at least, have to this rule, namely when 
there's a corresponding compound if or else. I personally find this 
unaesthetic to put it mildly:
   if (condition)       statement;   else   {       block of statements;   }



pgindent used to produce stuff like this, and you had to put a comment 
in the block to get around it, but we stopped that years ago, IIRC.

cheers

andrew




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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT ... ON CONFLICT UPDATE/IGNORE 4.0, parser/executor stuff
Следующее
От: Dave Jones
Дата:
Сообщение: Re: Temporal extensions