Skip to content

Commit 899ea54

Browse files
authored
postgres 19 support
Commit postgres/postgres@c83ac02 added new last argument ExplainState *es to standard_planner function and planner_hook_type type.
1 parent f96fb9e commit 899ea54

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

pg_wait_sampling.c

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ static PlannedStmt *pgws_planner_hook(Query *parse,
7575
#if PG_VERSION_NUM >= 130000
7676
const char *query_string,
7777
#endif
78-
int cursorOptions, ParamListInfo boundParams);
78+
int cursorOptions, ParamListInfo boundParams
79+
#if PG_VERSION_NUM >= 190000
80+
, ExplainState *es
81+
#endif
82+
);
7983
static void pgws_ExecutorStart(QueryDesc *queryDesc, int eflags);
8084
static void pgws_ExecutorRun(QueryDesc *queryDesc,
8185
ScanDirection direction,
@@ -937,7 +941,11 @@ pgws_planner_hook(Query *parse,
937941
const char *query_string,
938942
#endif
939943
int cursorOptions,
940-
ParamListInfo boundParams)
944+
ParamListInfo boundParams
945+
#if PG_VERSION_NUM >= 190000
946+
, ExplainState *es
947+
#endif
948+
)
941949
{
942950
PlannedStmt *result;
943951
int i = MyProc - ProcGlobal->allProcs;
@@ -958,13 +966,21 @@ pgws_planner_hook(Query *parse,
958966
#if PG_VERSION_NUM >= 130000
959967
query_string,
960968
#endif
961-
cursorOptions, boundParams);
969+
cursorOptions, boundParams
970+
#if PG_VERSION_NUM >= 190000
971+
, es
972+
#endif
973+
);
962974
else
963975
result = standard_planner(parse,
964976
#if PG_VERSION_NUM >= 130000
965977
query_string,
966978
#endif
967-
cursorOptions, boundParams);
979+
cursorOptions, boundParams
980+
#if PG_VERSION_NUM >= 190000
981+
, es
982+
#endif
983+
);
968984
nesting_level--;
969985
if (nesting_level == 0)
970986
pgws_proc_queryids[i] = UINT64CONST(0);

0 commit comments

Comments
 (0)