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

From Vik Fearing
Subject Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34
Date
Msg-id 2abdb464-27f5-4759-bb0b-f09ab5b5ceab@postgresfriends.org
Whole thread Raw
In response to BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34
List pgsql-bugs
On 26/02/2026 10:57, PG Bug reporting form wrote:
> 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 []


I can confirm that postgres violates the standard here.

-- 

Vik Fearing




pgsql-bugs by date:

Previous
From: Swirl Smog Dowry
Date:
Subject: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types
Next
From: PG Bug reporting form
Date:
Subject: BUG #19419: Cannot create custom functions using python3u