Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
Дата
Msg-id 7D19A273-1306-4F4C-9DFD-CE16F44790CB@justatheory.com
обсуждение исходный текст
Ответ на Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
Список pgsql-hackers
On Jul 10, 2025, at 19:23, David E. Wheeler <david@justatheory.com> wrote:

> Now with the `ISO C90 forbids mixed declarations and code` warning cleared up.
>
> Weird that there’s a failure on Bookworm with Meson [1] (pg_regress diffs [2]) but not Bookworm with Configure [3].
Collationissue, perhaps? 

David Johnson noticed that this build is 32-bit. I looked at the split_path function and after trying a couple of
things,realized that it was passing an int8 when the SQL function in Marlena.c passes an int4. This change got the test
passingin my clone (indentation reduced): 


```patch
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -2959,7 +2959,7 @@ executeStringInternalMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
     C_COLLATION_OID,
     CStringGetTextDatum(tmp),
     CStringGetTextDatum(from_str),
-    DirectFunctionCall1(numeric_int8, NumericGetDatum(n))));
+    DirectFunctionCall1(numeric_int4, NumericGetDatum(n))));
                 break;
             }
         default:
```

v12 attached.


Best,

David




Вложения

В списке pgsql-hackers по дате отправления: