pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: lukas.eder@gmail.com
Subject: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor>
Date: Thu, 26 Feb 2026 09:57:50 +0000
Message-ID: <19418-591ba1f29862ef5b@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19418
Logged by:          Lukas Eder
Email address:      lukas.eder@gmail.com
PostgreSQL version: 18.2
Operating system:   Linux
Description:        

When using the ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor by query>
syntax, 6.34 GR 4) b) i) says that empty tables should produce a JSON array
with no elements (intuitively), not NULL.

Try this:

  select json_array(select 1 where false);

It produces NULL, not []







view thread (29+ messages)  latest in thread

Message-ID: <19418-591ba1f29862ef5b@postgresql.org>
Permalink:  ../19418-591ba1f29862ef5b@postgresql.org/
Also on:    postgresql.org/message-id/19418-591ba1f29862ef5b@postgresql.org

 · 

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, lukas.eder@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: <19418-591ba1f29862ef5b@postgresql.org>

* 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