Thread

  1. Re: Fix jsonpath .split_part() to honor silent mode

    Nazir Bilal Yavuz <byavuz81@gmail.com> — 2026-05-13T09:57:50Z

    Hi,
    
    Thank you for working on this!
    
    On Tue, 12 May 2026 at 05:11, Chao Li <li.evan.chao@gmail.com> wrote:
    >
    > While testing the new json_path method split_part(), I noticed that it doesn’t honor silent mode. I think this is a v19-new bug.
    >
    > After looking into the code, I think the root cause is that .decimal() uses numeric_int4_safe() to parse integer arguments, while the .split_part() path in executeStringInternalMethod() uses numeric_int4() directly, which raises an error immediately for invalid values.
    >
    > The attached patch fixes this by switching the .split_part() path to use numeric_int4_safe() and report the argument errors through the jsonpath error handling mechanism.
    >
    > Please see the attached patch for details.
    
    I think you are right and I confirm that your patch fixes the problem.
    
    --
    Regards,
    Nazir Bilal Yavuz
    Microsoft