diff options
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r-- | src/backend/commands/explain.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index e26406365de..7e8d2db677b 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994-5, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.133 2005/04/19 22:35:10 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.134 2005/04/22 21:58:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -847,9 +847,14 @@ explain_outNode(StringInfo str, for (i = 0; i < indent; i++) appendStringInfo(str, " "); appendStringInfo(str, " -> "); + /* + * Ordinarily we don't pass down our own outer_plan value to our + * child nodes, but in bitmap scan trees we must, since the bottom + * BitmapIndexScan nodes may have outer references. + */ explain_outNode(str, outerPlan(plan), outerPlanState(planstate), - NULL, + IsA(plan, BitmapHeapScan) ? outer_plan : NULL, indent + 3, es); } @@ -907,7 +912,7 @@ explain_outNode(StringInfo str, explain_outNode(str, subnode, bitmapandstate->bitmapplans[j], - NULL, + outer_plan, /* pass down same outer plan */ indent + 3, es); j++; } @@ -931,7 +936,7 @@ explain_outNode(StringInfo str, explain_outNode(str, subnode, bitmaporstate->bitmapplans[j], - NULL, + outer_plan, /* pass down same outer plan */ indent + 3, es); j++; } |