@@ -50,6 +50,9 @@ CollectorShmqHeader *collector_hdr = NULL;
50
50
static shmem_startup_hook_type prev_shmem_startup_hook = NULL ;
51
51
static PGPROC * search_proc (int backendPid );
52
52
static PlannedStmt * pgws_planner_hook (Query * parse ,
53
+ #if PG_VERSION_NUM >= 130000
54
+ const char * query_string ,
55
+ #endif
53
56
int cursorOptions , ParamListInfo boundParams );
54
57
static void pgws_ExecutorEnd (QueryDesc * queryDesc );
55
58
@@ -771,7 +774,11 @@ pg_wait_sampling_get_history(PG_FUNCTION_ARGS)
771
774
* planner_hook hook, save queryId for collector
772
775
*/
773
776
static PlannedStmt *
774
- pgws_planner_hook (Query * parse , int cursorOptions ,
777
+ pgws_planner_hook (Query * parse ,
778
+ #if PG_VERSION_NUM >= 130000
779
+ const char * query_string ,
780
+ #endif
781
+ int cursorOptions ,
775
782
ParamListInfo boundParams )
776
783
{
777
784
if (MyProc )
@@ -795,9 +802,17 @@ pgws_planner_hook(Query *parse, int cursorOptions,
795
802
796
803
/* Invoke original hook if needed */
797
804
if (planner_hook_next )
798
- return planner_hook_next (parse , cursorOptions , boundParams );
805
+ return planner_hook_next (parse ,
806
+ #if PG_VERSION_NUM >= 130000
807
+ query_string ,
808
+ #endif
809
+ cursorOptions , boundParams );
799
810
800
- return standard_planner (parse , cursorOptions , boundParams );
811
+ return standard_planner (parse ,
812
+ #if PG_VERSION_NUM >= 130000
813
+ query_string ,
814
+ #endif
815
+ cursorOptions , boundParams );
801
816
}
802
817
803
818
/*
0 commit comments