From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shahar Belizon <shahar@cybear.co>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator
Date: Sun, 23 Oct 2022 11:31:45 -0400
Message-ID: <3541494.1666539105@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOaN=Vib3SuyPUcXNMUQb6NtftosEepPz6Yi6dy77Q6DmVs3dw@mail.gmail.com>
References: <17660-3fe48447b080d5b6@postgresql.org>
<3367660.1666446526@sss.pgh.pa.us>
<CAOaN=Vib3SuyPUcXNMUQb6NtftosEepPz6Yi6dy77Q6DmVs3dw@mail.gmail.com>
Shahar Belizon <shahar@cybear.co> 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 work
> 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
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: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, shahar@cybear.co, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator
In-Reply-To: <3541494.1666539105@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox