Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator
Date
Msg-id 3541494.1666539105@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator  (Shahar Belizon <shahar@cybear.co>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Shahar Belizon
Date:
Subject: Re: BUG #17660: JSONPATH issue using like_regex followed by the && operator
Next
From: PG Bug reporting form
Date:
Subject: BUG #17662: Error on UPDATE with ()