public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nazir Bilal Yavuz <[email protected]>
To: Chao Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Florents Tselai <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Subject: Re: Fix jsonpath .split_part() to honor silent mode
Date: Wed, 13 May 2026 12:57:50 +0300
Message-ID: <CAN55FZ05TxsGxJXJ4u-BJW=dc=ycGw96fNYzOMMuEFAa-MUynA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Hi,
Thank you for working on this!
On Tue, 12 May 2026 at 05:11, Chao Li <[email protected]> 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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Fix jsonpath .split_part() to honor silent mode
In-Reply-To: <CAN55FZ05TxsGxJXJ4u-BJW=dc=ycGw96fNYzOMMuEFAa-MUynA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox