diff options
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r-- | src/backend/executor/nodeAgg.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 1e211803df1..1756f35e7b6 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -61,7 +61,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.130 2005/03/16 21:38:07 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.131 2005/03/22 20:13:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -373,18 +373,9 @@ advance_transition_function(AggState *aggstate, /* * OK to call the transition function - * - * This is heavily-used code, so manually zero just the necessary fields - * instead of using MemSet(). Compare FunctionCall2(). */ - - /* MemSet(&fcinfo, 0, sizeof(fcinfo)); */ - fcinfo.context = (void *) aggstate; - fcinfo.resultinfo = NULL; - fcinfo.isnull = false; - - fcinfo.flinfo = &peraggstate->transfn; - fcinfo.nargs = 2; + InitFunctionCallInfoData(fcinfo, &(peraggstate->transfn), 2, + (void *) aggstate, NULL); fcinfo.arg[0] = pergroupstate->transValue; fcinfo.argnull[0] = pergroupstate->transValueIsNull; fcinfo.arg[1] = newVal; @@ -556,10 +547,8 @@ finalize_aggregate(AggState *aggstate, { FunctionCallInfoData fcinfo; - MemSet(&fcinfo, 0, sizeof(fcinfo)); - fcinfo.context = (void *) aggstate; - fcinfo.flinfo = &peraggstate->finalfn; - fcinfo.nargs = 1; + InitFunctionCallInfoData(fcinfo, &(peraggstate->finalfn), 1, + (void *) aggstate, NULL); fcinfo.arg[0] = pergroupstate->transValue; fcinfo.argnull[0] = pergroupstate->transValueIsNull; if (fcinfo.flinfo->fn_strict && pergroupstate->transValueIsNull) |