On Thu, Feb 26, 2026 at 10:20 PM Vik Fearing <vik(at)postgresfriends(dot)org> wrote:
>
> > Try this:
> >
> > select json_array(select 1 where false);
> >
> > It produces NULL, not []
>
>
> I can confirm that postgres violates the standard here.
>
> --
Since the subject title mentioned JSON_VALUE.
SELECT JSON_VALUE(((select NULL where false)), '$');
SELECT JSON_QUERY(((select NULL where false)), '$');
SELECT JSON_EXISTS(((select NULL where false)), '$');
Should the above produce []?
--
jian
https://www.enterprisedb.com/