Re: remaining sql/json patches - Mailing list pgsql-hackers

From Himanshu Upadhyaya
Subject Re: remaining sql/json patches
Date
Msg-id CAPF61jAwzR9OKAZJzmzMXNfok-+qxSD3-HnRAL43rX8-RQrPDQ@mail.gmail.com
Whole thread Raw
In response to Re: remaining sql/json patches  (Shruthi Gowda <gowdashru@gmail.com>)
Responses Re: remaining sql/json patches
List pgsql-hackers
Hi,

wanted to share the below case:

‘postgres[146443]=#’SELECT JSON_EXISTS(jsonb '{"customer_name": "test", "salary":1000, "department_id":1}', '$.* ? (@== $dept_id && @ == $sal)' PASSING 1000 AS sal, 1 as dept_id);
 json_exists
-------------
 f
(1 row)

isn't it supposed to return "true" as json in input is matching with both the condition dept_id and salary?

--
Regards,
Himanshu Upadhyaya
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel