Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34
Date
Msg-id CAMbWs4_n8f2kPHkEw=ToZMh2FAzc6BDXq9uND-iY9-MB_fE_Vg@mail.gmail.com
Whole thread
In response to Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34
List pgsql-bugs
On Fri, May 1, 2026 at 7:05 AM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> On Fri, Apr 24, 2026 at 3:58 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
> > On Thu, Apr 23, 2026 at 09:55:10AM +0900, Richard Guo wrote:
> > >> Hi RMT,
> > >>
> > >> I'd like to commit a fix for JSON_ARRAY(subquery) behavior that
> > >> involves a user-visible incompatibility, and would appreciate your
> > >> go/no-go since we're past feature freeze.
> > >>
> > >> Summary:
> > >>
> > >> - JSON_ARRAY(SELECT ...) currently returns NULL over an empty result
> > >> set, but the SQL/JSON standard requires it to return '[]'.  Fixing
> > >> this changes user-visible output.
> > >>
> > >> - The same patch also fixes a deparsing issue: views defined with
> > >> JSON_ARRAY(SELECT ...) are dumped back as the internal JSON_ARRAYAGG
> > >> rewrite instead of the original syntax.

> > I am fine with committing this for v19, assuming there is consensus on the
> > patch content.
> >
> > Heikki/Melanie: Any objections?

> Nope. I'm +1 on committing this now. 19 is unreleased -- I see no
> reason to wait a year.

Thank you, Nathan and Melanie.  I now have two of the three RMT
approvals, so I believe I'm good to go.  Will commit this shortly.

- Richard



pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: to_date()/to_timestamp() silently accept month=0 and day=0
Next
From: Richard Guo
Date:
Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34