Re: JSON: @@-operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kowarschick(at)gmail(dot)com
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: JSON: @@-operator
Date: 2019-10-29 23:35:55
Message-ID: 13000.1572392155@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2019-10-30 04:29:48 Re: PostgreSQL 12 release notes missing breaking change in libpq
Previous Message PG Doc comments form 2019-10-29 16:29:08 JSON: @@-operator