!1788 当values返回多条结果时,及时释放上一条结果的内存
Merge pull request !1788 from 吴岳川/I586MJ
This commit is contained in:
@ -88,6 +88,13 @@ TupleTableSlot* ExecResult(ResultState* node)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset per-tuple memory context to free any expression evaluation
|
||||
* storage allocated in the previous tuple cycle. Note this can't happen
|
||||
* until we're done projecting out tuples from a scan tuple.
|
||||
*/
|
||||
ResetExprContext(econtext);
|
||||
|
||||
/*
|
||||
* Check to see if we're still projecting out tuples from a previous scan
|
||||
* tuple (because there is a function-returning-set in the projection
|
||||
@ -102,13 +109,6 @@ TupleTableSlot* ExecResult(ResultState* node)
|
||||
node->ps.ps_TupFromTlist = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset per-tuple memory context to free any expression evaluation
|
||||
* storage allocated in the previous tuple cycle. Note this can't happen
|
||||
* until we're done projecting out tuples from a scan tuple.
|
||||
*/
|
||||
ResetExprContext(econtext);
|
||||
|
||||
/*
|
||||
* if rs_done is true then it means that we were asked to return a
|
||||
* constant tuple and we already did the last time ExecResult() was
|
||||
|
Reference in New Issue
Block a user