*** /afs/ece.cmu.edu/project/lcs/lcs-004/er1p/postgres/611/src/backend/executor/nodeAgg.c Thu Mar 11 23:59:11 1999 --- /afs/ece.cmu.edu/project/lcs/lcs-004/er1p/postgres/612/src/backend/executor/nodeAgg.c Fri Mar 19 15:01:21 1999 *************** *** 110,115 **** --- 110,116 ---- isNull2 = FALSE; bool qual_result; + Datum oldVal = (Datum) NULL; /* XXX - so that we can save and free on each iteration - er1p */ /* --------------------- * get state info from node *************** *** 372,379 **** --- 373,382 ---- */ args[0] = value1[aggno]; args[1] = newVal; + oldVal = value1[aggno]; /* XXX - save so we can free later - er1p */ value1[aggno] = (Datum) fmgr_c(&aggfns->xfn1, (FmgrValues *) args, &isNull1); + pfree(oldVal); /* XXX - new, let's free the old datum - er1p */ Assert(!isNull1); } }