Re: function 'IS JSON ARRAY' not identified

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Badia, Antonio" <antonio(dot)badia(at)louisville(dot)edu>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: function 'IS JSON ARRAY' not identified
Date: 2025-06-02 15:19:15
Message-ID: 3263995.1748877555@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Badia, Antonio" <antonio(dot)badia(at)louisville(dot)edu> writes:
> When running query
> select d.data - 'keya' || jsonb_build_object('keya', jsonb_array_elements(d.data::jsonb-> 'keya'))
> from "Jsondata2" as d
> where jsonb_exists(d.data '$.keya') and d.data->'keya' is not null and d.data->'keya' IS JSON ARRAY;
> I get the error message:
> ERROR: syntax error at or near "JSON" LINE 3: ... d.data->'keya' is not null and d.data->'keya' IS JSON ARRAY... ^
> SQL state: 42601
> Character: 213

> Running Postgresql on MacOS (Sequoia 15.5), installed via homebrew:
> antonio(at)mac POSTGRES % psql
> psql (14.18 (Homebrew), server 14.17 (Homebrew))

IS JSON ARRAY was added in PG v16.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Badia, Antonio 2025-06-02 15:26:09 Re: function 'IS JSON ARRAY' not identified
Previous Message Badia, Antonio 2025-06-02 14:41:34 function 'IS JSON ARRAY' not identified