From bc843d396032acb75abfbcfab1a0c3b0b252c3f1 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 22 Apr 2005 21:58:32 +0000 Subject: First cut at planner support for bitmap index scans. Lots to do yet, but the code is basically working. Along the way, rewrite the entire approach to processing OR index conditions, and make it work in join cases for the first time ever. orindxpath.c is now basically obsolete, but I left it in for the time being to allow easy comparison testing against the old implementation. --- src/backend/commands/explain.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/explain.c') 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++; } -- cgit v1.2.3