Re: Define jsonpath functions as stable
Jonathan S. Katz <jkatz@postgresql.org>
From: "Jonathan S. Katz" <jkatz@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Erik Rijkers <er@xs4all.nl>, Chapman Flack <chap@anastigmatix.net>,
pgsql-hackers@lists.postgresql.org
Date: 2019-09-18T01:13:18Z
Lists: pgsql-hackers
Attachments
- jsonpath-regex-doc-v4.patch (text/plain) patch v4
On 9/17/19 6:40 PM, Tom Lane wrote: > "Jonathan S. Katz" <jkatz@postgresql.org> writes: >> v2 attached. Thanks! > > I whacked this around some (well, quite a bit actually); So I see :) Thanks. > notably, > I thought we'd better describe things that are in our engine but > not XQuery, as well as vice-versa. Yeah, that makes sense. Overall it reads really well. One question I had in my head (and probably should have asked) was answered around the \w character class wrt collation. > After a re-read of the XQuery spec, it seems to me that the character > entry form that they have and we don't is actually "&#NNNN;" like > HTML, rather than just "#NN". Can anyone double-check that? Clicking through the XQuery spec eventual got me to here[1] (which warns me that its out of date, but that is what its "current" specs linked me to), which describes being able to use "&#[0-9]+;" and "&#[0-9a-fA-F]+;" to specify characters (which I recognize as a character escape from HTML, XML et al.). So based on that, my answer is "yes." > Does > it work outside bracket expressions, or only inside? Looking at the parse tree (start with the "atom"[2]), I read it as being able to use that syntax both inside and outside the bracket expressions. Here is a v4. I added some more paragraphs the bullet point that explains the different flags to make it feel a bit less dense. Thanks, Jonathan [1] https://www.w3.org/TR/2000/WD-xml-2e-20000814#dt-charref [2] https://www.w3.org/TR/xmlschema-2/#nt-atom
Commits
-
Fix some minor spec-compliance issues in jsonpath lexer.
- e56cad84d542 13.0 landed
- 5f3bec0769c1 12.0 landed
-
Doc: improve documentation around jsonpath regular expressions.
- b9cf94c8c249 12.0 landed
- 0a97edb12ec4 13.0 landed
-
Fix bogus handling of XQuery regex option flags.
- d5b90cd64855 13.0 landed
- 148881454208 12.0 landed