aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeWindowAgg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeWindowAgg.c')
-rw-r--r--src/backend/executor/nodeWindowAgg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index 7c07fb06848..3ac581a7113 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -623,10 +623,15 @@ finalize_windowaggregate(WindowAggState *winstate,
}
else
{
+ Datum res;
+
winstate->curaggcontext = peraggstate->aggcontext;
- *result = FunctionCallInvoke(fcinfo);
+ res = FunctionCallInvoke(fcinfo);
winstate->curaggcontext = NULL;
*isnull = fcinfo->isnull;
+ *result = MakeExpandedObjectReadOnly(res,
+ fcinfo->isnull,
+ peraggstate->resulttypeLen);
}
}
else