diff options
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/nodeAgg.c | 18 | ||||
-rw-r--r-- | src/backend/executor/nodeWindowAgg.c | 10 |
2 files changed, 5 insertions, 23 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 75e5bbf209d..d87677d6599 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -4935,24 +4935,6 @@ AggRegisterCallback(FunctionCallInfo fcinfo, } -/* - * aggregate_dummy - dummy execution routine for aggregate functions - * - * This function is listed as the implementation (prosrc field) of pg_proc - * entries for aggregate functions. Its only purpose is to throw an error - * if someone mistakenly executes such a function in the normal way. - * - * Perhaps someday we could assign real meaning to the prosrc field of - * an aggregate? - */ -Datum -aggregate_dummy(PG_FUNCTION_ARGS) -{ - elog(ERROR, "aggregate function %u called as normal function", - fcinfo->flinfo->fn_oid); - return (Datum) 0; /* keep compiler quiet */ -} - /* ---------------------------------------------------------------- * Parallel Query Support * ---------------------------------------------------------------- diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 4cc7da268d7..de58df3d3f7 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -2446,11 +2446,6 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags) perfuncstate->wfuncstate = wfuncstate; perfuncstate->wfunc = wfunc; perfuncstate->numArguments = list_length(wfuncstate->args); - - fmgr_info_cxt(wfunc->winfnoid, &perfuncstate->flinfo, - econtext->ecxt_per_query_memory); - fmgr_info_set_expr((Node *) wfunc, &perfuncstate->flinfo); - perfuncstate->winCollation = wfunc->inputcollid; get_typlenbyval(wfunc->wintype, @@ -2479,6 +2474,11 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags) winobj->argstates = wfuncstate->args; winobj->localmem = NULL; perfuncstate->winobj = winobj; + + /* It's a real window function, so set up to call it. */ + fmgr_info_cxt(wfunc->winfnoid, &perfuncstate->flinfo, + econtext->ecxt_per_query_memory); + fmgr_info_set_expr((Node *) wfunc, &perfuncstate->flinfo); } } |