mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Make NestLoop plan nodes pass outer-relation variables into their inner
relation using the general PARAM_EXEC executor parameter mechanism, rather than the ad-hoc kluge of passing the outer tuple down through ExecReScan. The previous method was hard to understand and could never be extended to handle parameters coming from multiple join levels. This patch doesn't change the set of possible plans nor have any significant performance effect, but it's necessary infrastructure for future generalization of the concept of an inner indexscan plan. ExecReScan's second parameter is now unused, so it's removed.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeAppend.c,v 1.77 2010/01/02 16:57:41 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeAppend.c,v 1.78 2010/07/12 17:01:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -263,7 +263,7 @@ ExecEndAppend(AppendState *node)
|
||||
}
|
||||
|
||||
void
|
||||
ExecReScanAppend(AppendState *node, ExprContext *exprCtxt)
|
||||
ExecReScanAppend(AppendState *node)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -280,12 +280,10 @@ ExecReScanAppend(AppendState *node, ExprContext *exprCtxt)
|
||||
|
||||
/*
|
||||
* If chgParam of subnode is not null then plan will be re-scanned by
|
||||
* first ExecProcNode. However, if caller is passing us an exprCtxt
|
||||
* then forcibly rescan all the subnodes now, so that we can pass the
|
||||
* exprCtxt down to the subnodes (needed for appendrel indexscan).
|
||||
* first ExecProcNode.
|
||||
*/
|
||||
if (subnode->chgParam == NULL || exprCtxt != NULL)
|
||||
ExecReScan(subnode, exprCtxt);
|
||||
if (subnode->chgParam == NULL)
|
||||
ExecReScan(subnode);
|
||||
}
|
||||
node->as_whichplan = 0;
|
||||
exec_append_initialize_next(node);
|
||||
|
Reference in New Issue
Block a user