• Tom Lane's avatar
    Fix assorted corner-case bugs in contrib/intarray. · fdf2dbda
    Tom Lane authored
    The array containment operators now behave per mathematical expectation
    for empty arrays (ie, an empty array is contained in anything).
    Both these operators and the query_int operators now work as expected in
    GiST and GIN index searches, rather than having corner cases where the
    index searches gave different answers.
    
    Also, fix unexpected failures where the operators would claim that an array
    contained nulls, when in fact there was no longer any null present (similar
    to bug #5784).  The restriction to not have nulls is still there, as
    removing it would take a lot of added code complexity and probably slow
    things down significantly.
    
    Also, remove the arbitrary restriction to 1-D arrays; unlike the other
    restriction, this was buying us nothing performance-wise.
    
    Assorted cosmetic improvements and marginal performance improvements, too.
    fdf2dbda
_int_tool.c 6.22 KB