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

Commit34437d3

Browse files
committed
Compatibility with changes in vanilla Random implementation in v15
1 parent0490934 commit34437d3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/rumget.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
#ifPG_VERSION_NUM >=120000
2323
#include"utils/float.h"
2424
#endif
25-
25+
#ifPG_VERSION_NUM >=150000
26+
#include"common/pg_prng.h"
27+
#endif
2628
#include"rum.h"
2729

2830
/* GUC parameter */
@@ -1131,7 +1133,12 @@ entryGetNextItemList(RumState * rumstate, RumScanEntry entry, Snapshot snapshot)
11311133
return true;
11321134
}
11331135

1136+
#ifPG_VERSION_NUM<150000
11341137
#definerum_rand() (((double) random()) / ((double) MAX_RANDOM_VALUE))
1138+
#else
1139+
#definerum_rand() pg_prng_double(&pg_global_prng_state)
1140+
#endif
1141+
11351142
#definedropItem(e) ( rum_rand() > ((double)RumFuzzySearchLimit)/((double)((e)->predictNumberResult)) )
11361143

11371144
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp