• H
    Allow opclasses to provide tri-valued GIN consistent functions. · c5608ea2
    Heikki Linnakangas 提交于
    With the GIN "fast scan" feature, GIN can skip items without fetching all
    the keys for them, if it can prove that they don't match regardless of
    those keys. So far, it has done the proving by calling the boolean
    consistent function with all combinations of TRUE/FALSE for the unfetched
    keys, but since that's O(n^2), it becomes unfeasible with more than a few
    keys. We can avoid calling consistent with all the combinations, if we can
    tell the operator class implementation directly which keys are unknown.
    
    This commit includes a triConsistent function for the built-in array and
    tsvector opclasses.
    
    Alexander Korotkov, with some changes by me.
    c5608ea2
builtins.h 49.8 KB