Re: GinPageIs* don't actually return a boolean

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: GinPageIs* don't actually return a boolean
Дата
Msg-id 20150812225402.GA701@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: GinPageIs* don't actually return a boolean  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: GinPageIs* don't actually return a boolean  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2015-08-12 18:52:59 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I went through all headers in src/include and checked for macros
> > containing [^&]&[^&] and checked whether they have this hazard. Found a
> > fair number.
> 
> > That patch also changes !! tests into != 0 style.
> 
> Looks OK to me, except I wonder why you did this
>  
>  #define TRIGGER_FIRED_FOR_ROW(event) \
> -    ((event) & TRIGGER_EVENT_ROW)
> +    (((event) & TRIGGER_EVENT_ROW) == TRIGGER_EVENT_ROW)
> 
> rather than != 0.  That way doesn't look either more efficient or
> more readable.

Purely consistency with the surrounding code. I was on the fence about
that one...



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: GinPageIs* don't actually return a boolean
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GinPageIs* don't actually return a boolean