From: Tom Lane <tgl@sss.pgh.pa.us>
To: kowarschick@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: JSON: @@-operator
Date: Tue, 29 Oct 2019 19:35:55 -0400
Message-ID: <13000.1572392155@sss.pgh.pa.us> (raw)
In-Reply-To: <157236654810.1042.9358599433792740462@wrigleys.postgresql.org>
References: <157236654810.1042.9358599433792740462@wrigleys.postgresql.org>
PG Doc comments form <noreply@postgresql.org> writes:
> The following documentation comment has been logged on the website:
> Page: https://www.postgresql.org/docs/12/functions-json.html
> Description:
> '{"a":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2' does not work;
> '{"a":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2'::jsonpath works as expected
They both work for me:
regression=# select '{"a":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2';
?column?
----------
t
(1 row)
regression=# select '{"a":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2'::jsonpath;
?column?
----------
t
(1 row)
The most likely explanation is that you have some non-built-in
"jsonb @@ something" operator in your installation. But you
did not say what "does not work" means, so I'm just guessing.
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-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, kowarschick@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: JSON: @@-operator
In-Reply-To: <13000.1572392155@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