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
signature.asc
Description: PGP signature