From: Tom Lane <tgl@sss.pgh.pa.us>
To: Badia, Antonio <antonio.badia@louisville.edu>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: function 'IS JSON ARRAY' not identified
Date: Mon, 02 Jun 2025 11:19:15 -0400
Message-ID: <3263995.1748877555@sss.pgh.pa.us> (raw)
In-Reply-To: <BN7PR03MB347651B5C4951F037352DBA18B62A@BN7PR03MB3476.namprd03.prod.outlook.com>
References: <BN7PR03MB347651B5C4951F037352DBA18B62A@BN7PR03MB3476.namprd03.prod.outlook.com>
"Badia, Antonio" <antonio.badia@louisville.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@mac POSTGRES % psql
> psql (14.18 (Homebrew), server 14.17 (Homebrew))
IS JSON ARRAY was added in PG v16.
regards, tom lane
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: tgl@sss.pgh.pa.us, antonio.badia@louisville.edu, pgsql-bugs@lists.postgresql.org
Subject: Re: function 'IS JSON ARRAY' not identified
In-Reply-To: <3263995.1748877555@sss.pgh.pa.us>
* 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