BUG #17660: JSONPATH issue using like_regex followed by the && operator

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17660: JSONPATH issue using like_regex followed by the && operator
Дата
Msg-id 17660-3fe48447b080d5b6@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17660
Logged by:          Shahar Belizon
Email address:      shahar@cybear.co
PostgreSQL version: 14.4
Operating system:   CentOS
Description:

Hello,
I've found an issue with the like_regex statement when using it together
with another && condition.
In the following example I'm expecting the result will end as:
[{"id":9,"value":"a"}] but instead, it ends with an empty array:

WITH a(attributes) AS (
    SELECT '[{"id":9,"value":"a"},{"id":9,"value":"a$"}]'::jsonb
)
SELECT jsonb_path_query_array(attributes,'$[*] ? (!(@.id==9 && @.value
like_regex "\$$"))') FROM a


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Pantelis Theodosiou
Дата:
Сообщение: Re: Delete from table where id in (bugged query) - fully remove all data without any notice.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator