From 0c3281ce7c0b66d2f6a9d06b8bd475691c37c2b5 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 12 Jun 1999 14:07:33 +0000 Subject: Reversed out Massimo patch. --- src/backend/executor/nodeAgg.c | 48 +----------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) (limited to 'src/backend/executor/nodeAgg.c') diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 9d0f4ea1036..a47a9ad5492 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -31,11 +31,6 @@ #include "utils/syscache.h" #include "optimizer/clauses.h" -#ifdef FREE_TUPLE_MEMORY -#include -#include -#endif - /* * AggFuncInfo - * keeps the transition functions information around @@ -118,9 +113,7 @@ ExecAgg(Agg *node) isNull1 = FALSE, isNull2 = FALSE; bool qual_result; -#ifdef FREE_TUPLE_MEMORY - bool free_tuple_memory = pg_options[OPT_FREE_TUPLE_MEMORY]; -#endif + /* --------------------- * get state info from node @@ -248,10 +241,6 @@ ExecAgg(Agg *node) for (;;) { TupleTableSlot *outerslot; -#ifdef FREE_TUPLE_MEMORY - Oid valueType; - bool isByValue = 0; -#endif isNull = isNull1 = isNull2 = 0; outerslot = ExecProcNode(outerPlan, (Plan *) node); @@ -304,31 +293,6 @@ ExecAgg(Agg *node) newVal = ExecEvalExpr(aggref->target, econtext, &isNull, &isDone); } -#ifdef FREE_TUPLE_MEMORY - if (free_tuple_memory) { - switch (nodeTag(aggref->target)) { - case T_Const: - isByValue = ((Const*) (aggref->target))->constbyval; - break; - case T_Var: - valueType = ((Var*) (aggref->target))->vartype; - isByValue = typeByVal(typeidType(valueType)); - break; - case T_Array: - isByValue = ((Array*)(aggref->target))->arrayelembyval; - break; - case T_ArrayRef: - isByValue =((ArrayRef*)(aggref->target))->refelembyval; - break; - case T_Expr: - valueType = ((Expr*) (aggref->target))->typeOid; - isByValue = typeByVal(typeidType(valueType)); - break; - default: - break; - } - } -#endif if (isNull && !aggref->usenulls) continue; /* ignore this tuple for this agg */ @@ -389,16 +353,6 @@ ExecAgg(Agg *node) (FmgrValues *) args, &isNull2); Assert(!isNull2); } - -#ifdef FREE_TUPLE_MEMORY - /* try to pfree newVal if not isByValue - dz */ - if (free_tuple_memory && !isByValue && - PortalHeapMemoryIsValid(CurrentMemoryContext, - (Pointer) newVal)) - { - pfree(newVal); - } -#endif } /* -- cgit v1.2.3