• Tom Lane's avatar
    When adding a "target IS NOT NULL" indexqual to the plan for an index-optimized · ed83f6e3
    Tom Lane authored
    MIN or MAX, we must take care to insert the added qual in a legal place among
    the existing indexquals, if any.  The btree index AM requires the quals to
    appear in index-column order.  We didn't have to worry about this before
    because "target IS NOT NULL" was just treated as a plain scan filter condition;
    but as of 9.0 it can be an index qual and then it has to follow the rule.
    Per report from Ian Barwick.
    ed83f6e3
planagg.c 23 KB