Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8440edd

Browse files
authored
Merge pull request#24 from rjuju/fix_pg13
Fix compatibility with PG13.
2 parentsdf0e68a +a7fe4a6 commit8440edd

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

‎collector.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#include"postgres.h"
1111

1212
#include"catalog/pg_type.h"
13+
#ifPG_VERSION_NUM >=130000
14+
#include"common/hashfn.h"
15+
#endif
1316
#include"funcapi.h"
1417
#include"miscadmin.h"
1518
#include"postmaster/bgworker.h"

‎pg_wait_sampling.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ CollectorShmqHeader *collector_hdr = NULL;
5050
staticshmem_startup_hook_typeprev_shmem_startup_hook=NULL;
5151
staticPGPROC*search_proc(intbackendPid);
5252
staticPlannedStmt*pgws_planner_hook(Query*parse,
53+
#ifPG_VERSION_NUM >=130000
54+
constchar*query_string,
55+
#endif
5356
intcursorOptions,ParamListInfoboundParams);
5457
staticvoidpgws_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
*/
773776
staticPlannedStmt*
774-
pgws_planner_hook(Query*parse,intcursorOptions,
777+
pgws_planner_hook(Query*parse,
778+
#ifPG_VERSION_NUM >=130000
779+
constchar*query_string,
780+
#endif
781+
intcursorOptions,
775782
ParamListInfoboundParams)
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-
returnplanner_hook_next(parse,cursorOptions,boundParams);
805+
returnplanner_hook_next(parse,
806+
#ifPG_VERSION_NUM >=130000
807+
query_string,
808+
#endif
809+
cursorOptions,boundParams);
799810

800-
returnstandard_planner(parse,cursorOptions,boundParams);
811+
returnstandard_planner(parse,
812+
#ifPG_VERSION_NUM >=130000
813+
query_string,
814+
#endif
815+
cursorOptions,boundParams);
801816
}
802817

803818
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp