Skip to content

Commit 61704b4

Browse files
author
Arseny Kositsyn
committed
[PGPRO-12159] Fixed the build on version 12 of PostgreSQL.
Tags: rum
1 parent cfd7220 commit 61704b4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/rum_debug_funcs.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "rum.h"
2525
#include "tsearch/ts_type.h"
2626
#include "utils/lsyscache.h"
27+
#include "catalog/pg_type_d.h"
2728

2829
PG_FUNCTION_INFO_V1(rum_metapage_info);
2930
PG_FUNCTION_INFO_V1(rum_page_opaque_info);
@@ -471,9 +472,12 @@ rum_page_opaque_info(PG_FUNCTION_ARGS)
471472

472473
#if PG_VERSION_NUM >= 160000
473474
values[4] = PointerGetDatum(construct_array_builtin(flags, nflags, TEXTOID));
474-
#else
475+
#elif PG_VERSION_NUM >= 130000
475476
values[4] = PointerGetDatum(construct_array(flags, nflags,
476477
TEXTOID, -1, false, TYPALIGN_INT));
478+
#else
479+
values[4] = PointerGetDatum(construct_array(flags, nflags,
480+
TEXTOID, -1, false, 'i'));
477481
#endif
478482

479483
pfree(page);
@@ -1373,7 +1377,9 @@ find_posting_tree_root(BlockNumber *cur_page_num,
13731377
while (*cur_tuple_num <= PageGetMaxOffsetNumber(cur_page))
13741378
{
13751379
cur_itup = (IndexTuple)
1376-
PageGetItem(cur_page, PageGetItemId(cur_page, (*cur_tuple_num)++));
1380+
PageGetItem(cur_page, PageGetItemId(cur_page, *cur_tuple_num));
1381+
1382+
(*cur_tuple_num)++;
13771383

13781384
*cur_key_attnum = rumtuple_get_attrnum(rum_state_ptr, cur_itup);
13791385

0 commit comments

Comments
 (0)