I believe I have found and fixed the crash-in-EvalPlanQual problem you
two reported. The patch for current sources is attached --- it should
work in 7.1.* too, although line numbers might be off a bit.
regards, tom lane
*** src/backend/executor/nodeIndexscan.c.orig Mon Oct 29 15:30:53 2001
--- src/backend/executor/nodeIndexscan.c Mon Nov 12 12:18:06 2001
***************
*** 339,348 ****
{
/*
* If we are being passed an outer tuple, save it for runtime key
! * calc
*/
if (exprCtxt != NULL)
econtext->ecxt_outertuple = exprCtxt->ecxt_outertuple;
/*
* Reset the runtime-key context so we don't leak memory as each
--- 339,355 ----
{
/*
* If we are being passed an outer tuple, save it for runtime key
! * calc. We also need to link it into the "regular" per-tuple
! * econtext, so it can be used during indexqualorig evaluations.
*/
if (exprCtxt != NULL)
+ {
+ ExprContext *stdecontext;
+
econtext->ecxt_outertuple = exprCtxt->ecxt_outertuple;
+ stdecontext = node->scan.scanstate->cstate.cs_ExprContext;
+ stdecontext->ecxt_outertuple = exprCtxt->ecxt_outertuple;
+ }
/*
* Reset the runtime-key context so we don't leak memory as each