Re: GinPageIs* don't actually return a boolean

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: GinPageIs* don't actually return a boolean
Date: 2015-08-12 22:52:59
Message-ID: 29387.1439419979@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-08-12 22:54:02 Re: GinPageIs* don't actually return a boolean
Previous Message Tom Lane 2015-08-12 22:41:11 Re: pgsql: Further fixes for degenerate outer join clauses.