summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRobert Haas2025-03-28 12:59:33 +0000
committerRobert Haas2025-03-28 13:02:37 +0000
commit9f0c36aea0fba7d2b737964d34ed582edf644283 (patch)
tree3a594b25dcc07ffe67748b5374b304947fd04a94 /contrib
parentcdc168ad4b22ea4183f966688b245cabb5935d1f (diff)
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 <[email protected]> Discussion: http://postgr.es/m/[email protected]
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pg_overexplain/pg_overexplain.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/pg_overexplain/pg_overexplain.c b/contrib/pg_overexplain/pg_overexplain.c
index 4554c3abbbf..5f623e06019 100644
--- a/contrib/pg_overexplain/pg_overexplain.c
+++ b/contrib/pg_overexplain/pg_overexplain.c
@@ -135,6 +135,10 @@ overexplain_per_node_hook(PlanState *planstate, List *ancestors,
overexplain_options *options;
Plan *plan = planstate->plan;
+ if (prev_explain_per_node_hook)
+ (*prev_explain_per_node_hook) (planstate, ancestors, relationship,
+ plan_name, es);
+
options = GetExplainExtensionState(es, es_extension_id);
if (options == NULL)
return;
@@ -251,6 +255,10 @@ overexplain_per_plan_hook(PlannedStmt *plannedstmt,
{
overexplain_options *options;
+ if (prev_explain_per_plan_hook)
+ (*prev_explain_per_plan_hook) (plannedstmt, into, es, queryString,
+ params, queryEnv);
+
options = GetExplainExtensionState(es, es_extension_id);
if (options == NULL)
return;