aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 45e8edf5957..54f82e6dada 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -980,11 +980,14 @@ explain_outNode(StringInfo 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.
+ * BitmapIndexScan nodes may have outer references. Also, we must do
+ * so at a Result node, because it might be a pseudoconstant-qual
+ * gating node inserted into an inner indexscan plan.
*/
explain_outNode(str, outerPlan(plan),
outerPlanState(planstate),
- IsA(plan, BitmapHeapScan) ? outer_plan : NULL,
+ (IsA(plan, BitmapHeapScan) ||
+ IsA(plan, Result)) ? outer_plan : NULL,
indent + 3, es);
}