Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited875a4

Browse files
committed
Fix for InitPlan-s: have to copy subselect' result tuple.
1 parent015593f commited875a4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/backend/executor/nodeSubplan.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext)
9595
break;
9696
}
9797

98+
if ( !found&&sublink->subLinkType==ALL_SUBLINK )
99+
return ((Datum) true);
100+
98101
return ((Datum)result);
99102
}
100103

@@ -193,6 +196,15 @@ ExecSetParamPlan (SubPlan *node)
193196
break;
194197
}
195198

199+
/*
200+
* If this is uncorrelated subquery then its plan will be closed
201+
* (see below) and this tuple will be free-ed - bad for not byval
202+
* types... But is free-ing possible in the next ExecProcNode in
203+
* this loop ? Who knows... Someday we'll keep track of saved
204+
* tuples...
205+
*/
206+
tup=heap_copytuple (tup);
207+
196208
foreach (lst,node->setParam)
197209
{
198210
ParamExecData*prm=&(plan->state->es_param_exec_vals[lfirsti(lst)]);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp