• Tom Lane's avatar
    Implement outer-level aggregates to conform to the SQL spec, with · e649796f
    Tom Lane authored
    extensions to support our historical behavior.  An aggregate belongs
    to the closest query level of any of the variables in its argument,
    or the current query level if there are no variables (e.g., COUNT(*)).
    The implementation involves adding an agglevelsup field to Aggref,
    and treating outer aggregates like outer variables at planning time.
    e649796f
parse_func.c 40.3 KB