Re: Define jsonpath functions as stable - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Define jsonpath functions as stable
Date
Msg-id 11147.1568647208@sss.pgh.pa.us
Whole thread Raw
In response to Re: Define jsonpath functions as stable  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Responses Re: Define jsonpath functions as stable
List pgsql-hackers
"Jonathan S. Katz" <jkatz@postgresql.org> writes:
> It sounds like the easiest path to completion without potentially adding
> futures headaches pushing back the release too far would be that, e.g.
> these examples:

>     $.** ? (@ like_regex "O(w|v)" pg flag "i")
>     $.** ? (@ like_regex "O(w|v)" pg)

> If it's using POSIX regexp, I would +1 using "posix" instead of "pg"

I agree that we'd be better off to say "POSIX".  However, having just
looked through the references Chapman provided, it seems to me that
the regex language Henry Spencer's library provides is awful darn
close to what XPath is asking for.  The main thing I see in the XML/XPath
specs that we don't have is a bunch of character class escapes that are
specifically tied to Unicode character properties.  We could possibly
add code to implement those, but I'm not sure how it'd work in non-UTF8
database encodings.  There may also be subtle differences in the behavior
of character class escapes that we do have in common, such as "\s" for
white space; but again I'm not sure that those are any different than
what you get naturally from encoding or locale variations.

I think we could possibly get away with not having any special marker
on regexes, but just explaining in the documentation that "features
so-and-so are not implemented".  Writing that text would require closer
analysis than I've seen in this thread as to exactly what the differences
are.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Default JIT setting in V12
Next
From: Anastasia Lubennikova
Date:
Subject: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.