From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Yury Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: GinPageIs* don't actually return a boolean |
Date: | 2016-02-12 16:15:59 |
Message-ID: | 56BE053F.5080002@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
One more option for patch:
#define GinPageIsLeaf(page) ((bool)(GinPageGetOpaque(page)->flags & GIN_LEAF))
Seems it will work on any platform with built-in bool. But I don't know will it
work with 'typedef char bool' if high bit will be set.
> That's true, but it doesn't really seem like a reason not to commit
> this patch. I mean, the coding here is (a) dangerous by your own
> admission and (b) actually breaks on platforms for which we allege
> support. If we find out that somebody has implemented an int-width
> bool we'll have some bigger decisions to make, but I don't see any
> particular reason why we've got to make those decisions now.
+1
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Christian Ullrich | 2016-02-12 16:24:24 | Crash with old Windows on new CPU |
Previous Message | Robert Haas | 2016-02-12 15:55:02 | Re: Clock with Adaptive Replacement |