On Mon, Jun 17, 2019 at 8:40 PM Thom Brown <t...@linux.com> wrote: > On Fri, 14 Jun 2019 at 08:16, Kyotaro Horiguchi <horikyota....@gmail.com> > wrote: > > > > Hi, Thom. > > > > At Thu, 13 Jun 2019 14:59:51 +0100, Thom Brown <t...@linux.com> wrote > > in <CAA-aLv4VVX=b9rk5hkfpxjczqaitdqo04tew9i0wiqvhdkc...@mail.gmail.com> > > > Hi, > > > > > > I've been reading through the documentation regarding jsonpath and > > > jsonb_path_query etc., and I have found it lacking explanation for > > > some functionality, and I've also had some confusion when using the > > > feature. > > > > > > ? operator > > > ========== > > > The first mention of '?' is in section 9.15, where it says: > > > > > > "Suppose you would like to retrieve all heart rate values higher than > > > 130. You can achieve this using the following expression: > > > '$.track.segments[*].HR ? (@ > 130)'" > > > > > > So what is the ? operator doing here? Sure, there's the regular ? > > > > It is described just above as: > > > > | Each filter expression must be enclosed in parentheses and > > | preceded by a question mark. > > Can I suggest that, rather than using "question mark", we use the "?" > symbol, or provide a syntax structure which shows something like: > > <path expression> ? <filter expression> > > This not only makes this key information clearer and more prominent, > but it also makes the "?" symbol searchable in a browser for anyone > wanting to find out what that symbol is doing.
Sounds good for me. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company