> Looking through the code again, gin_compare_prefix_##type looks a little
> confusing.
>
> Is there a reason for using:
> (data->strategy == BTLessStrategyNumber ||
> data->strategy == BTLessEqualStrategyNumber ) ?
> PointerGetDatum(data->datum) : a
> rather than just using:
> PointerGetDatum(data->datum)
Added comments:
/*
* Datum a is a value from extract_query method and for BTLess*
* strategy it is a left-most value. So, use original datum from
* QueryInfo to decide stop scanning on not. Datum b is always
* from index.
*/
> Also, it might be a little less confusing if you used two separate
> variables rather than using "res" for two purposes.
done
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/