• Tom Lane's avatar
    Fix up LIMIT/OFFSET planning so that we cope with non-constant LIMIT · dfdf07aa
    Tom Lane authored
    or OFFSET clauses by using estimate_expression_value().  The main advantage
    of this is that if the expression is a Param and we have a value for the
    Param, we'll use that value rather than defaulting.  Also, fix some
    thinkos in the logic for combining LIMIT/OFFSET with an externally
    supplied tuple fraction (this covers cases like EXISTS(...LIMIT...)).
    And make sure the results of all this are shown by EXPLAIN.  Per a
    gripe from Merlin Moncure.
    dfdf07aa
planmain.h 2.93 KB