|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.64 2001/10/28 06:25:43 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.65 2001/11/12 17:18:06 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -339,10 +339,17 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent) |
339 | 339 | { |
340 | 340 | /* |
341 | 341 | * If we are being passed an outer tuple, save it for runtime key |
342 | | - * calc |
| 342 | + * calc. We also need to link it into the "regular" per-tuple |
| 343 | + * econtext, so it can be used during indexqualorig evaluations. |
343 | 344 | */ |
344 | 345 | if (exprCtxt!=NULL) |
| 346 | +{ |
| 347 | +ExprContext*stdecontext; |
| 348 | + |
345 | 349 | econtext->ecxt_outertuple=exprCtxt->ecxt_outertuple; |
| 350 | +stdecontext=node->scan.scanstate->cstate.cs_ExprContext; |
| 351 | +stdecontext->ecxt_outertuple=exprCtxt->ecxt_outertuple; |
| 352 | +} |
346 | 353 |
|
347 | 354 | /* |
348 | 355 | * Reset the runtime-key context so we don't leak memory as each |
|