DF
text/plain
*** nodeSubplan.c.orig Thu Feb 19 08:54:19 1998
--- nodeSubplan.c Thu Feb 19 09:10:25 1998
***************
*** 193,198 ****
--- 193,206 ----
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...
+ */
+ if ( plan->extParam == NULL )
+ tup = heap_copytuple (tup);
+
foreach (lst, node->setParam)
{
ParamExecData *prm = &(plan->state->es_param_exec_vals[lfirsti(lst)]);