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) : arather 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: teo...@sigaev.ru WWW: http://www.sigaev.ru/
btree_gin-0.10.gz
Description: Unix tar archive
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers