pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Vik Fearing <vik@postgresfriends.org>
Cc: lukas.eder@gmail.com, pgsql-bugs@lists.postgresql.org, rmt@lists.postgresql.org, Álvaro Herrera <alvherre@kurilemu.de>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor>
Date: Fri, 24 Apr 2026 14:58:25 -0500
Message-ID: <aevLYeoSSgiwEiO-@nathan> (raw)
In-Reply-To: <CAMbWs49ps9eGWvkwc64ytUxdK0s-=xdFjtf64WyGp65EgTZ_LQ@mail.gmail.com>
References: <501040.1772433449@sss.pgh.pa.us>
	<CAMbWs49P2z40f5yb_97ErwtC9ocdR5QQN0gWUZtjgot9+iGAcg@mail.gmail.com>
	<CAMbWs4-NuYP+0Zq9=Ufwy5GcM0XQnEqWjJFucaRGO4EQgiCcow@mail.gmail.com>
	<CAMbWs4-ra9mkBhUs2kmB5KxWuo80oAA33gZ=8JmRxmG3qGNxUg@mail.gmail.com>
	<CA+HiwqEtiTNV2v2P0HGa0B1TMNfmPweKXMZEOYPoQuFf3ZhsXQ@mail.gmail.com>
	<CAMbWs49tDE_niKLr4mzsa2BkX7fkWrorBzWheKTBziZ7z9-AuQ@mail.gmail.com>
	<CAMbWs48KEdgyJhxCOysaRdRJ5NzPObUET+5XbvyiqDfqyABEwg@mail.gmail.com>
	<485641.1776738632@sss.pgh.pa.us>
	<CAMbWs4_vqNEcHpvKFeFxfRoisrvw6yJ3styhS-arQDHZirw5cQ@mail.gmail.com>
	<CAMbWs49ps9eGWvkwc64ytUxdK0s-=xdFjtf64WyGp65EgTZ_LQ@mail.gmail.com>

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?

-- 
nathan





view thread (29+ messages)  latest in thread

Message-ID: <aevLYeoSSgiwEiO-@nathan>
Permalink:  ../aevLYeoSSgiwEiO-@nathan/
Also on:    postgresql.org/message-id/aevLYeoSSgiwEiO-@nathan

 · 

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: nathandbossart@gmail.com, guofenglinux@gmail.com, tgl@sss.pgh.pa.us, amitlangote09@gmail.com, vik@postgresfriends.org, alvherre@kurilemu.de, hlinnaka@iki.fi, melanieplageman@gmail.com
  Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor>
  In-Reply-To: <aevLYeoSSgiwEiO-@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox