mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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/nodeTidscan.c,v 1.65 2010/01/02 16:57:45 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeTidscan.c,v 1.66 2010/07/12 17:01:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -17,7 +17,7 @@
|
||||
*
|
||||
* ExecTidScan scans a relation using tids
|
||||
* ExecInitTidScan creates and initializes state info.
|
||||
* ExecTidReScan rescans the tid relation.
|
||||
* ExecReScanTidScan rescans the tid relation.
|
||||
* ExecEndTidScan releases all storage.
|
||||
* ExecTidMarkPos marks scan position.
|
||||
* ExecTidRestrPos restores scan position.
|
||||
@ -398,17 +398,12 @@ ExecTidScan(TidScanState *node)
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* ExecTidReScan(node)
|
||||
* ExecReScanTidScan(node)
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
ExecTidReScan(TidScanState *node, ExprContext *exprCtxt)
|
||||
ExecReScanTidScan(TidScanState *node)
|
||||
{
|
||||
/* If we are being passed an outer tuple, save it for runtime key calc */
|
||||
if (exprCtxt != NULL)
|
||||
node->ss.ps.ps_ExprContext->ecxt_outertuple =
|
||||
exprCtxt->ecxt_outertuple;
|
||||
|
||||
if (node->tss_TidList)
|
||||
pfree(node->tss_TidList);
|
||||
node->tss_TidList = NULL;
|
||||
|
Reference in New Issue
Block a user