Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1omcxA-0000iG-7b for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Oct 2022 15:31:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1omcx8-0003Ou-OH for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Oct 2022 15:31:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1omcx8-0003Ol-G0 for pgsql-bugs@lists.postgresql.org; Sun, 23 Oct 2022 15:31:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1omcx2-0003Ah-4k for pgsql-bugs@lists.postgresql.org; Sun, 23 Oct 2022 15:31:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 29NFVj9T3541495; Sun, 23 Oct 2022 11:31:45 -0400 From: Tom Lane To: Shahar Belizon cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator In-reply-to: References: <17660-3fe48447b080d5b6@postgresql.org> <3367660.1666446526@sss.pgh.pa.us> Comments: In-reply-to Shahar Belizon message dated "Sun, 23 Oct 2022 10:56:14 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3541493.1666539105.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 23 Oct 2022 11:31:45 -0400 Message-ID: <3541494.1666539105@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Shahar Belizon writes: > Well, I see what you are saying, but still, when checking the result of = *SELECT > 'a' ~ '\$$'* I'm getting a *FALSE, *so I expect the JSONPATH parser to w= ork > the same way. I don't think you did grasp the point. There's an additional level of literal-parsing and backslash-stripping involved in the jsonpath case, because the jsonpath path string contains an embedded string literal, which has to have some kind of escaping behavior. Otherwise, how could you search for a pattern that includes a double-quote? The underlying regex behavior is the same either way; it's the surface syntax that's different because of the extra parsing layer. regards, tom lane