Skip to content

Commit 9f0c36a

Browse files
committed
pg_overexplain: Call previous hooks as appropriate.
It makes no sense to remember the previous values of the hook variables and then never bother calling those functions. Thanks to Andrei for spotting my goof. Author: Andrei Lepikhov <lepihov@gmail.com> Discussion: http://postgr.es/m/41a344e3-ffb1-4296-8ba7-801f1e9642e5@gmail.com
1 parent cdc168a commit 9f0c36a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

contrib/pg_overexplain/pg_overexplain.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ overexplain_per_node_hook(PlanState *planstate, List *ancestors,
135135
overexplain_options *options;
136136
Plan *plan = planstate->plan;
137137

138+
if (prev_explain_per_node_hook)
139+
(*prev_explain_per_node_hook) (planstate, ancestors, relationship,
140+
plan_name, es);
141+
138142
options = GetExplainExtensionState(es, es_extension_id);
139143
if (options == NULL)
140144
return;
@@ -251,6 +255,10 @@ overexplain_per_plan_hook(PlannedStmt *plannedstmt,
251255
{
252256
overexplain_options *options;
253257

258+
if (prev_explain_per_plan_hook)
259+
(*prev_explain_per_plan_hook) (plannedstmt, into, es, queryString,
260+
params, queryEnv);
261+
254262
options = GetExplainExtensionState(es, es_extension_id);
255263
if (options == NULL)
256264
return;

0 commit comments

Comments
 (0)