diff options
Diffstat (limited to 'src/backend/executor/nodeMaterial.c')
-rw-r--r-- | src/backend/executor/nodeMaterial.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c index 4ede428f908..657814cd0db 100644 --- a/src/backend/executor/nodeMaterial.c +++ b/src/backend/executor/nodeMaterial.c @@ -146,10 +146,8 @@ ExecMaterial(PlanState *pstate) if (tuplestorestate) tuplestore_puttupleslot(tuplestorestate, outerslot); - /* - * We can just return the subplan's returned tuple, without copying. - */ - return outerslot; + ExecCopySlot(slot, outerslot); + return slot; } /* @@ -223,13 +221,13 @@ ExecInitMaterial(Material *node, EState *estate, int eflags) * * material nodes only return tuples from their materialized relation. */ - ExecInitResultTupleSlotTL(&matstate->ss.ps); + ExecInitResultTupleSlotTL(&matstate->ss.ps, &TTSOpsMinimalTuple); matstate->ss.ps.ps_ProjInfo = NULL; /* * initialize tuple type. */ - ExecCreateScanSlotFromOuterPlan(estate, &matstate->ss); + ExecCreateScanSlotFromOuterPlan(estate, &matstate->ss, &TTSOpsMinimalTuple); return matstate; } |