agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: Manu <manuelreyesbravo@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Cc: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: chaitanyyachoudhary@gmail.com
Subject: Re: BUG #19695: JSON_VALUE ... RETURNING jsonb returns NULL for later evaluation once one evaluation returns NULL
Date: Wed, 23 Sep 2026 17:12:34 -0300
Message-ID: <179019435414.699921.11893679831783704384@gmail.com> (raw)
In-Reply-To: <CAFC+b6p8Oo3_pLXPa=DVXx1XDQJ09b2W3U3WKPtkQYyh0z0z-A@mail.gmail.com>
References: <CAFC+b6p8Oo3_pLXPa=DVXx1XDQJ09b2W3U3WKPtkQYyh0z0z-A@mail.gmail.com>

Hi Srinath,

I tested your v1 on master, REL_18_STABLE and REL_17_STABLE, together
with Andrey's v2 for #19621 [1], which touches the same function.  Both
apply cleanly on all three branches, build without warnings, and the
main regression suite passes.  On all three,
JSON_VALUE(x, '$' RETURNING jsonb) over '1', 'null', '2' now returns
1, NULL, 2 (it was 1, NULL, NULL).

The fix looks right to me: that branch fills val_string but never
cleared the resnull left by an earlier row.

A small thing: git apply warns about trailing whitespace on four lines
of the new test in sqljson_queryfuncs.sql.

[1]
https://postgr.es/m/CAB8bMitawD=ERVLwYuDXvMT_OJqf+qAKx=3GEH6V_WHT7jnq7A@mail.gmail.com

Regards,
Manu






view thread (6+ messages)  latest in thread

Message-ID: <179019435414.699921.11893679831783704384@gmail.com>
Permalink:  ../179019435414.699921.11893679831783704384@gmail.com/
Also on:    postgresql.org/message-id/179019435414.699921.11893679831783704384@gmail.com

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: pgsql-bugs@postgresql.org
  Cc: manuelreyesbravo@gmail.com, pgsql-bugs@lists.postgresql.org, srinath2133@gmail.com, amitlangote09@gmail.com, chaitanyyachoudhary@gmail.com
  Subject: Re: BUG #19695: JSON_VALUE ... RETURNING jsonb returns NULL for later evaluation once one evaluation returns NULL
  In-Reply-To: <179019435414.699921.11893679831783704384@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