11diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
2- index 19ffcc2cacb..93934d42e30 100644
2+ index 22616cf7add..8a28b783f72 100644
33--- a/src/backend/commands/explain.c
44+++ b/src/backend/commands/explain.c
5- @@ -27 ,6 +27 ,7 @@
5+ @@ -29 ,6 +29 ,7 @@
66 #include "nodes/extensible.h"
77 #include "nodes/makefuncs.h"
88 #include "nodes/nodeFuncs.h"
99+ #include "optimizer/cost.h"
1010 #include "parser/analyze.h"
1111 #include "parser/parsetree.h"
1212 #include "rewrite/rewriteHandler.h"
13- @@ -50 ,6 +51 ,12 @@ ExplainOneQuery_hook_type ExplainOneQuery_hook = NULL;
14- /* Hook for plugins to get control in explain_get_index_name() */
15- explain_get_index_name_hook_type explain_get_index_name_hook = NULL;
13+ @@ -45 ,6 +46 ,12 @@
14+ #include "utils/typcache.h"
15+ #include "utils/xml.h"
1616
1717+ /* Hook for plugins to get control in ExplainOnePlan() */
1818+ ExplainOnePlan_hook_type ExplainOnePlan_hook = NULL;
@@ -21,9 +21,9 @@ index 19ffcc2cacb..93934d42e30 100644
2121+ ExplainOneNode_hook_type ExplainOneNode_hook = NULL;
2222+
2323
24- /*
25- * Various places within need to convert bytes to kilobytes. Round these up
26- @@ -815 ,6 +822 ,10 @@ ExplainOnePlan(PlannedStmt *plannedstmt, CachedPlan *cplan,
24+ /* Hook for plugins to get control in ExplainOneQuery() */
25+ ExplainOneQuery_hook_type ExplainOneQuery_hook = NULL;
26+ @@ -690 ,6 +697 ,10 @@ ExplainOnePlan(PlannedStmt *plannedstmt, CachedPlan *cplan,
2727 ExplainPropertyFloat("Execution Time", "ms", 1000.0 * totaltime, 3,
2828 es);
2929
@@ -34,7 +34,7 @@ index 19ffcc2cacb..93934d42e30 100644
3434 ExplainCloseGroup("Query", NULL, true, es);
3535 }
3636
37- @@ -2009 ,6 +2020 ,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
37+ @@ -1884 ,6 +1895 ,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
3838 }
3939 }
4040
@@ -521,22 +521,22 @@ index 5b35debc8ff..06a7bebe4f8 100644
521521 * estimate_num_groups - Estimate number of groups in a grouped query
522522 *
523523diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h
524- index 64547bd9b9c..74792f1a8cf 100644
524+ index e8e92f966a1..323b3391b35 100644
525525--- a/src/include/commands/explain.h
526526+++ b/src/include/commands/explain.h
527- @@ -87 ,6 +87 ,18 @@ extern PGDLLIMPORT ExplainOneQuery_hook_type ExplainOneQuery_hook ;
527+ @@ -49 ,6 +49 ,18 @@ extern PGDLLIMPORT explain_per_node_hook_type explain_per_node_hook ;
528528 typedef const char *(*explain_get_index_name_hook_type) (Oid indexId);
529529 extern PGDLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;
530530
531531+ /* Hook for plugins to get control in ExplainOnePlan() */
532532+ typedef void (*ExplainOnePlan_hook_type) (PlannedStmt *plannedstmt, IntoClause *into,
533- + ExplainState *es, const char *queryString,
533+ + struct ExplainState *es, const char *queryString,
534534+ ParamListInfo params, const instr_time *planduration,
535535+ QueryEnvironment *queryEnv);
536536+ extern PGDLLIMPORT ExplainOnePlan_hook_type ExplainOnePlan_hook;
537537+
538538+ /* Explain a node info */
539- + typedef void (*ExplainOneNode_hook_type) (ExplainState *es,
539+ + typedef void (*ExplainOneNode_hook_type) (struct ExplainState *es,
540540+ PlanState *ps,
541541+ Plan *plan);
542542+ extern PGDLLIMPORT ExplainOneNode_hook_type ExplainOneNode_hook;
0 commit comments