public inbox for [email protected]  
help / color / mirror / Atom feed
From: Himanshu Upadhyaya <[email protected]>
To: Alvaro Herrera <[email protected]>
To: Amit Langote <[email protected]>
Cc: jian he <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Erik Rijkers <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: Tomas Vondra <[email protected]>
Subject: Re: remaining sql/json patches
Date: Tue, 12 Mar 2024 15:11:58 +0530
Message-ID: <CAPF61jAwzR9OKAZJzmzMXNfok-+qxSD3-HnRAL43rX8-RQrPDQ@mail.gmail.com> (raw)
In-Reply-To: <CAASxf_PqyUZTo-h0C7qyGhEZQyuC6KUjqvWA4NeAYM+XT5NWnA@mail.gmail.com>
References: <CAASxf_MW4RBUYuS3ybbJYH9U7LQ5cjT699naiG+xKX8g=7Ut2g@mail.gmail.com>
	<[email protected]>
	<CAASxf_PqyUZTo-h0C7qyGhEZQyuC6KUjqvWA4NeAYM+XT5NWnA@mail.gmail.com>

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


view thread (6+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: remaining sql/json patches
  In-Reply-To: <CAPF61jAwzR9OKAZJzmzMXNfok-+qxSD3-HnRAL43rX8-RQrPDQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox