BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor>

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: lukas(dot)eder(at)gmail(dot)com
Subject: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor>
Date: 2026-02-26 09:57:50
Message-ID: 19418-591ba1f29862ef5b@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 19418
Logged by: Lukas Eder
Email address: lukas(dot)eder(at)gmail(dot)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 []

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Swirl Smog Dowry 2026-02-26 10:18:43 pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types
Previous Message PG Bug reporting form 2026-02-26 07:21:05 BUG #19417: '\dD' fails to list user-defined domains that shadow built-in type names (e.g., 'numeric')