diff options
Diffstat (limited to 'contrib/pg_overexplain/pg_overexplain.c')
-rw-r--r-- | contrib/pg_overexplain/pg_overexplain.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/pg_overexplain/pg_overexplain.c b/contrib/pg_overexplain/pg_overexplain.c index de824566f8c..bd70b6d9d5e 100644 --- a/contrib/pg_overexplain/pg_overexplain.c +++ b/contrib/pg_overexplain/pg_overexplain.c @@ -236,6 +236,18 @@ overexplain_per_node_hook(PlanState *planstate, List *ancestors, ((MergeAppend *) plan)->apprelids, es); break; + case T_Result: + + /* + * 'relids' is only meaningful when plan->lefttree is NULL, + * but if somehow it ends up set when plan->lefttree is not + * NULL, print it anyway. + */ + if (plan->lefttree == NULL || + ((Result *) plan)->relids != NULL) + overexplain_bitmapset("RTIs", + ((Result *) plan)->relids, + es); default: break; } |