From 702cb9245330f138f6faa3d86821ec1466f08f7b Mon Sep 17 00:00:00 2001 From: Karina Litskevich Date: Mon, 4 May 2026 14:47:51 +0300 Subject: [PATCH] [PGPRO-18446] Correct Datum conversions See vanilla commits dcfc0f89 ff89e182 See discussion: https://www.postgresql.org/message-id/flat/8246d7ff-f4b7-4363-913e-827dadfeb145%40eisentraut.org Tags: rum --- src/rum_arr_utils.c | 2 +- src/rum_debug_funcs.c | 2 +- src/rum_ts_utils.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rum_arr_utils.c b/src/rum_arr_utils.c index 683faad7dd..28f8b49038 100644 --- a/src/rum_arr_utils.c +++ b/src/rum_arr_utils.c @@ -200,7 +200,7 @@ rum_extract_anyarray(PG_FUNCTION_ARGS) { /* Use array's size as additional info */ (*addInfo)[i] = Int32GetDatum(*nentries); - (*addInfoIsNull)[i] = BoolGetDatum(false); + (*addInfoIsNull)[i] = false; } /* we should not free array, entries[i] points into it */ diff --git a/src/rum_debug_funcs.c b/src/rum_debug_funcs.c index b138ef00de..7bd8e93d9a 100644 --- a/src/rum_debug_funcs.c +++ b/src/rum_debug_funcs.c @@ -1298,7 +1298,7 @@ get_entry_leaf_posting_tree_result(RumPageItemsState piState) piState->nulls[counter++] = true; /* Returning the root of the posting tree */ - piState->values[counter++] = true; + piState->values[counter++] = BoolGetDatum(true); piState->values[counter++] = UInt32GetDatum(RumGetPostingTree(piState->curItup)); diff --git a/src/rum_ts_utils.c b/src/rum_ts_utils.c index 5294ff3c10..dfcf40081c 100644 --- a/src/rum_ts_utils.c +++ b/src/rum_ts_utils.c @@ -1214,11 +1214,11 @@ build_tsvector_entry(TSVector vector, WordEntry *we) static Datum build_tsvector_hash_entry(TSVector vector, WordEntry *we) { - int32 hash_value; + Datum hash_value; hash_value = hash_any((const unsigned char *) (STRPTR(vector) + we->pos), we->len); - return Int32GetDatum(hash_value); + return hash_value; } /* @@ -1369,7 +1369,7 @@ build_tsquery_entry(TSQuery query, QueryOperand *operand) static Datum build_tsquery_hash_entry(TSQuery query, QueryOperand *operand) { - int32 hash_value; + Datum hash_value; hash_value = hash_any( (const unsigned char *) (GETOPERAND(query) + operand->distance),