Re: [HACKERS] taking stdbool.h into use
| От | Michael Paquier |
|---|---|
| Тема | Re: [HACKERS] taking stdbool.h into use |
| Дата | |
| Msg-id | 20171228004752.GA6181@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: [HACKERS] taking stdbool.h into use (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
| Ответы |
Re: [HACKERS] taking stdbool.h into use
|
| Список | pgsql-hackers |
On Wed, Dec 27, 2017 at 12:52:55PM -0500, Peter Eisentraut wrote: > On 12/26/17 23:10, Michael Paquier wrote: > > It would be nice to do something like that for GinTernaryValue in > > tsginidx.c by mapping directly to GIN_FALSE and GIN_TRUE depending on > > the input coming in gin_tsquery_consistent. The fix is more trivial > > there. > > For GinTernaryValue, I think it's easier to just make it the same size > as bool, since it doesn't go onto disk. My earlier patch did that. I'm > not sure it's worth adding more code to copy the array around. But on prairiedog the sizeof bool and char are different, so compilation would fail, no? checkcondition_gin is used only by gin_tsquery_consistent so I think that it is possible to get advantage of that by using a secondary type of GinChkVal which uses directly a bool array and converts the check value for the operand to a GinTernaryValue value on-the-fly. I agree that this would make the code more complex though for not much gain on modern platform. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: