Re: BUG #19491: Segmentation fault triggered by IS NULL

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>, 798604270@qq.com, pgsql-bugs@lists.postgresql.org
Date: 2026-06-08T18:40:20Z
Lists: pgsql-bugs
On 2026-Jun-06, Srinath Reddy Sadipiralla wrote:

> > 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 -- will review, hoping to push soon.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"That sort of implies that there are Emacs keystrokes which aren't obscure.
I've been using it daily for 2 years now and have yet to discover any key
sequence which makes any sense."                        (Paul Thomas)



Commits

  1. IS JSON/JSON(): Protect against expressions uncoercible to text

  2. Reject degenerate SPLIT PARTITION with DEFAULT partition