|
24 | 24 | #include "rum.h" |
25 | 25 | #include "tsearch/ts_type.h" |
26 | 26 | #include "utils/lsyscache.h" |
| 27 | +#include "catalog/pg_type_d.h" |
27 | 28 |
|
28 | 29 | PG_FUNCTION_INFO_V1(rum_metapage_info); |
29 | 30 | PG_FUNCTION_INFO_V1(rum_page_opaque_info); |
@@ -471,9 +472,12 @@ rum_page_opaque_info(PG_FUNCTION_ARGS) |
471 | 472 |
|
472 | 473 | #if PG_VERSION_NUM >= 160000 |
473 | 474 | values[4] = PointerGetDatum(construct_array_builtin(flags, nflags, TEXTOID)); |
474 | | -#else |
| 475 | +#elif PG_VERSION_NUM >= 130000 |
475 | 476 | values[4] = PointerGetDatum(construct_array(flags, nflags, |
476 | 477 | TEXTOID, -1, false, TYPALIGN_INT)); |
| 478 | +#else |
| 479 | + values[4] = PointerGetDatum(construct_array(flags, nflags, |
| 480 | + TEXTOID, -1, false, 'i')); |
477 | 481 | #endif |
478 | 482 |
|
479 | 483 | pfree(page); |
@@ -1373,7 +1377,9 @@ find_posting_tree_root(BlockNumber *cur_page_num, |
1373 | 1377 | while (*cur_tuple_num <= PageGetMaxOffsetNumber(cur_page)) |
1374 | 1378 | { |
1375 | 1379 | 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)++; |
1377 | 1383 |
|
1378 | 1384 | *cur_key_attnum = rumtuple_get_attrnum(rum_state_ptr, cur_itup); |
1379 | 1385 |
|
|
0 commit comments