1
1
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
2
- index 19ffcc2cacb..93934d42e30 100644
2
+ index 22616cf7add..8a28b783f72 100644
3
3
--- a/src/backend/commands/explain.c
4
4
+++ b/src/backend/commands/explain.c
5
- @@ -27 ,6 +27 ,7 @@
5
+ @@ -29 ,6 +29 ,7 @@
6
6
#include "nodes/extensible.h"
7
7
#include "nodes/makefuncs.h"
8
8
#include "nodes/nodeFuncs.h"
9
9
+ #include "optimizer/cost.h"
10
10
#include "parser/analyze.h"
11
11
#include "parser/parsetree.h"
12
12
#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"
16
16
17
17
+ /* Hook for plugins to get control in ExplainOnePlan() */
18
18
+ ExplainOnePlan_hook_type ExplainOnePlan_hook = NULL;
@@ -21,9 +21,9 @@ index 19ffcc2cacb..93934d42e30 100644
21
21
+ ExplainOneNode_hook_type ExplainOneNode_hook = NULL;
22
22
+
23
23
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,
27
27
ExplainPropertyFloat("Execution Time", "ms", 1000.0 * totaltime, 3,
28
28
es);
29
29
@@ -34,7 +34,7 @@ index 19ffcc2cacb..93934d42e30 100644
34
34
ExplainCloseGroup("Query", NULL, true, es);
35
35
}
36
36
37
- @@ -2009 ,6 +2020 ,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
37
+ @@ -1884 ,6 +1895 ,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
38
38
}
39
39
}
40
40
@@ -521,22 +521,22 @@ index 5b35debc8ff..06a7bebe4f8 100644
521
521
* estimate_num_groups - Estimate number of groups in a grouped query
522
522
*
523
523
diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h
524
- index 64547bd9b9c..74792f1a8cf 100644
524
+ index e8e92f966a1..323b3391b35 100644
525
525
--- a/src/include/commands/explain.h
526
526
+++ 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 ;
528
528
typedef const char *(*explain_get_index_name_hook_type) (Oid indexId);
529
529
extern PGDLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;
530
530
531
531
+ /* Hook for plugins to get control in ExplainOnePlan() */
532
532
+ typedef void (*ExplainOnePlan_hook_type) (PlannedStmt *plannedstmt, IntoClause *into,
533
- + ExplainState *es, const char *queryString,
533
+ + struct ExplainState *es, const char *queryString,
534
534
+ ParamListInfo params, const instr_time *planduration,
535
535
+ QueryEnvironment *queryEnv);
536
536
+ extern PGDLLIMPORT ExplainOnePlan_hook_type ExplainOnePlan_hook;
537
537
+
538
538
+ /* Explain a node info */
539
- + typedef void (*ExplainOneNode_hook_type) (ExplainState *es,
539
+ + typedef void (*ExplainOneNode_hook_type) (struct ExplainState *es,
540
540
+ PlanState *ps,
541
541
+ Plan *plan);
542
542
+ extern PGDLLIMPORT ExplainOneNode_hook_type ExplainOneNode_hook;
0 commit comments