public inbox for [email protected]
help / color / mirror / Atom feedFrom: Srinath Reddy Sadipiralla <[email protected]>
To: Ayush Tiwari <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Álvaro Herrera <[email protected]>
Subject: Re: BUG #19491: Segmentation fault triggered by IS NULL
Date: Sat, 6 Jun 2026 11:57:38 +0530
Message-ID: <CAFC+b6pKHWbZMYnVmGoFv5hiSgf=_koiTXP-DF+cDZbRo+u-5w@mail.gmail.com> (raw)
In-Reply-To: <CAJTYsWX3wF0Mm0TX4iMdRvtUHmVeLnARzQXzQAKVxmH+m3zE9g@mail.gmail.com>
References: <[email protected]>
<CAJTYsWXsDYpYvOs5ZC48ziEkyziy0j7Km023U8u9cLqMd1poug@mail.gmail.com>
<CAFC+b6q8GikS7NdDq8sC-Au4j7WZshUtw4Gzw78j0umxJ-LTqg@mail.gmail.com>
<CAJTYsWX3wF0Mm0TX4iMdRvtUHmVeLnARzQXzQAKVxmH+m3zE9g@mail.gmail.com>
Hi,
On Fri, Jun 5, 2026 at 9:41 PM Ayush Tiwari <[email protected]>
wrote:
> Hi,
>
> On Mon, 25 May 2026 at 22:06, Srinath Reddy Sadipiralla <
> [email protected]> wrote:
>
>> Hi,
>>
>> I have reviewed the patch , i think the error message might be
>> something like
>>
>> diff --git a/src/backend/parser/parse_expr.c
>> b/src/backend/parser/parse_expr.c
>> index 89d0f348303..59e34f082e4 100644
>> --- a/src/backend/parser/parse_expr.c
>> +++ b/src/backend/parser/parse_expr.c
>> @@ -4203,6 +4203,13 @@ transformJsonParseArg(ParseState *pstate, Node
>> *jsexpr, JsonFormat *format,
>>
>> TEXTOID, -1,
>>
>> COERCION_IMPLICIT,
>>
>> COERCE_IMPLICIT_CAST, -1);
>> + if(expr == NULL)
>> + ereport(ERROR,
>> + (errcode(ERRCODE_CANNOT_COERCE),
>> + errmsg("cannot cast type %s to %s",
>> + format_type_be(*exprtype),
>> + format_type_be(TEXTOID)),
>> + parser_errposition(pstate,
>> exprLocation(raw_expr))));
>> *exprtype = TEXTOID;
>> }
>>
>
> Thanks, that reads better. v2 attached, raising ERRCODE_CANNOT_COERCE
> right where the coercion fails:
>
> ERROR: cannot cast type sqljson_mystr to text
>
> which also covers the JSON() WITH UNIQUE KEYS path.
>
Thanks for the updated patch, LGTM.
--
Thanks :)
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/
view thread (7+ messages) latest in thread
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: BUG #19491: Segmentation fault triggered by IS NULL
In-Reply-To: <CAFC+b6pKHWbZMYnVmGoFv5hiSgf=_koiTXP-DF+cDZbRo+u-5w@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