aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeAgg.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-22 20:13:09 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-22 20:13:09 +0000
commitbd9b4a9d46600eeadbb8420d45a29b819c73bba7 (patch)
tree4e52f6b63d645c464315237d4976d40895369758 /src/backend/executor/nodeAgg.c
parent94e03330cbd163378e43094388f87fcba4801ba8 (diff)
downloadpostgresql-bd9b4a9d46600eeadbb8420d45a29b819c73bba7.tar.gz
postgresql-bd9b4a9d46600eeadbb8420d45a29b819c73bba7.zip
Use InitFunctionCallInfoData() macro instead of MemSet in performance
critical places in execQual. By Atsushi Ogawa; some minor cleanup by moi.
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r--src/backend/executor/nodeAgg.c21
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)