On Jun 13, 2024, at 11:32, David E. Wheeler <da...@justatheory.com> wrote:

> Should && and || not also work on scalar operands?

I see the same issue for unary !, too:

david=# select jsonb_path_query('true', '!$');
ERROR:  syntax error at or near "$" of jsonpath input
LINE 1: select jsonb_path_query('true', '!$');
                                        ^
david=# select jsonb_path_query('[1, 3, 7]', '$[*] ? (!true)');
ERROR:  syntax error at end of jsonpath input
LINE 1: select jsonb_path_query('[1, 3, 7]', '$[*] ? (!true)');
                                             ^
david=# select jsonb_path_query('[1, 3, 7]', '$[*] ? (!@.boolean())');
ERROR:  syntax error at or near "@" of jsonpath input
LINE 1: select jsonb_path_query('[1, 3, 7]', '$[*] ? (!@.boolean())'...
                                             ^

Best,

David



Reply via email to