| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера