diff options
Diffstat (limited to 'src/backend/parser/parse_agg.c')
-rw-r--r-- | src/backend/parser/parse_agg.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index a25f8d5b989..24268eb5024 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -1959,6 +1959,11 @@ resolve_aggregate_transtype(Oid aggfuncid, * latter may be InvalidOid, however if invtransfn_oid is set then * transfn_oid must also be set. * + * transfn_oid may also be passed as the aggcombinefn when the *transfnexpr is + * to be used for a combine aggregate phase. We expect invtransfn_oid to be + * InvalidOid in this case since there is no such thing as an inverse + * combinefn. + * * Pointers to the constructed trees are returned into *transfnexpr, * *invtransfnexpr. If there is no invtransfn, the respective pointer is set * to NULL. Since use of the invtransfn is optional, NULL may be passed for @@ -2023,35 +2028,6 @@ build_aggregate_transfn_expr(Oid *agg_input_types, /* * Like build_aggregate_transfn_expr, but creates an expression tree for the - * combine function of an aggregate, rather than the transition function. - */ -void -build_aggregate_combinefn_expr(Oid agg_state_type, - Oid agg_input_collation, - Oid combinefn_oid, - Expr **combinefnexpr) -{ - Node *argp; - List *args; - FuncExpr *fexpr; - - /* combinefn takes two arguments of the aggregate state type */ - argp = make_agg_arg(agg_state_type, agg_input_collation); - - args = list_make2(argp, argp); - - fexpr = makeFuncExpr(combinefn_oid, - agg_state_type, - args, - InvalidOid, - agg_input_collation, - COERCE_EXPLICIT_CALL); - /* combinefn is currently never treated as variadic */ - *combinefnexpr = (Expr *) fexpr; -} - -/* - * Like build_aggregate_transfn_expr, but creates an expression tree for the * serialization function of an aggregate. */ void |