Re: [PATCH] binary heap implementation

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCH] binary heap implementation
Дата
Msg-id 20121115162702.GI5585@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [PATCH] binary heap implementation  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan escribió:
>
> On 11/15/2012 10:11 AM, Robert Haas wrote:
>
> >+    {
> >+        sift_down(heap, i);
> >+    }
> >
> >Project style is to omit braces for a single-line body.  This comes up
> >a few other places as well.
>
> I thought we modified that some years ago, although my memory of it
> is a bit hazy.

No, we only modified pg_indent to not take the braces off, because
of PG_TRY blocks.  But we keep using single statements instead of
compound in many places; but there is no hard rule about it.  To me,
using braces were they are not needed is pointless and ugly.  We're very
careful about ensuring that our macro definitions work nicely with
single-statement if/else, for example.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WIP patch for hint bit i/o mitigation
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH 03/14] Add simple xlogdump tool