Re: GinPageIs* don't actually return a boolean
От | Teodor Sigaev |
---|---|
Тема | Re: GinPageIs* don't actually return a boolean |
Дата | |
Msg-id | 56BE053F.5080002@sigaev.ru обсуждение исходный текст |
Ответ на | Re: GinPageIs* don't actually return a boolean (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: GinPageIs* don't actually return a boolean
Re: GinPageIs* don't actually return a boolean |
Список | 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@sigaev.ru WWW: http://www.sigaev.ru/
В списке pgsql-hackers по дате отправления: