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

Commitdbb2a93

Browse files
committed
Ensure that ExecPrepareExprList's result is all in one memory context.
Noted by Amit Langote.Discussion:https://postgr.es/m/aad31672-4983-d95d-d24e-6b42fee9b985@lab.ntt.co.jp
1 parent0c73285 commitdbb2a93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/executor/execExpr.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,15 +511,21 @@ List *
511511
ExecPrepareExprList(List*nodes,EState*estate)
512512
{
513513
List*result=NIL;
514+
MemoryContextoldcontext;
514515
ListCell*lc;
515516

517+
/* Ensure that the list cell nodes are in the right context too */
518+
oldcontext=MemoryContextSwitchTo(estate->es_query_cxt);
519+
516520
foreach(lc,nodes)
517521
{
518522
Expr*e= (Expr*)lfirst(lc);
519523

520524
result=lappend(result,ExecPrepareExpr(e,estate));
521525
}
522526

527+
MemoryContextSwitchTo(oldcontext);
528+
523529
returnresult;
524530
}
525531

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp