@@ -50,6 +50,9 @@ CollectorShmqHeader *collector_hdr = NULL;
5050static shmem_startup_hook_type prev_shmem_startup_hook = NULL ;
5151static PGPROC * search_proc (int backendPid );
5252static PlannedStmt * pgws_planner_hook (Query * parse ,
53+ #if PG_VERSION_NUM >= 130000
54+ const char * query_string ,
55+ #endif
5356 int cursorOptions , ParamListInfo boundParams );
5457static void pgws_ExecutorEnd (QueryDesc * queryDesc );
5558
@@ -771,7 +774,11 @@ pg_wait_sampling_get_history(PG_FUNCTION_ARGS)
771774 * planner_hook hook, save queryId for collector
772775 */
773776static 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 ,
775782 ParamListInfo boundParams )
776783{
777784 if (MyProc )
@@ -795,9 +802,17 @@ pgws_planner_hook(Query *parse, int cursorOptions,
795802
796803 /* Invoke original hook if needed */
797804 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 );
799810
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 );
801816}
802817
803818/*
0 commit comments