• J
    Reinstate strictness of int4_avg_combine · 3f111c5c
    Jesse Zhang 提交于
    The "combine" function for the int4 sum/avg aggregate functions is
    backported to Greenplum 6.0 in commit 313cef6e (from
    postgres/postgres@11c8669c0cc) but we made the inevitable omission of
    setting the "strictness" of int4_avg_combine to false. This by itself is
    harmless as the actual function body *does* guard against NULL input,
    but it also prohibits a whole host of optimizations when the executor
    and planner can detect NULL input early on and short-circuit the
    execution. Oops.
    
    This patch flips the `proisstrict` flag back to true for
    int4_avg_combine.
    
    Backpatch to 6X_STABLE.
    
    (cherry picked from commit c334bedc)
    3f111c5c
pg_proc.h 505.6 KB