aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSubplan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeSubplan.c')
-rw-r--r--src/backend/executor/nodeSubplan.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 610f0a09643..3c5560d13bd 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -95,6 +95,9 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext)
break;
}
+ if ( !found && sublink->subLinkType == ALL_SUBLINK )
+ return ((Datum) true);
+
return ((Datum) result);
}
@@ -193,6 +196,15 @@ ExecSetParamPlan (SubPlan *node)
break;
}
+ /*
+ * If this is uncorrelated subquery then its plan will be closed
+ * (see below) and this tuple will be free-ed - bad for not byval
+ * types... But is free-ing possible in the next ExecProcNode in
+ * this loop ? Who knows... Someday we'll keep track of saved
+ * tuples...
+ */
+ tup = heap_copytuple (tup);
+
foreach (lst, node->setParam)
{
ParamExecData *prm = &(plan->state->es_param_exec_vals[lfirsti(lst)]);