Re: JSONPATH documentation - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: JSONPATH documentation
Date
Msg-id CAPpHfduePV4VtPpR_juwTHL90aZA8T1Rq9L_ZkQd7k99imgxhA@mail.gmail.com
Whole thread Raw
In response to Re: JSONPATH documentation  (Steven Pousty <steve.pousty@gmail.com>)
Responses Re: JSONPATH documentation
List pgsql-hackers
On Mon, Sep 23, 2019 at 7:52 PM Steven Pousty <steve.pousty@gmail.com> wrote:
> JSON Containment, JSONPath, and Transforms are means to work with JSONB but not the actual datatype itself. Doc
shouldbe split into
 
> 1) Data type - how do declare, indexing, considerations when using it...
> 2) Ways to work with the data type - functions, containment, JSONPath...
>
> These can be separate pages or on the same page but they need to be logically and physically separated

According to your proposal, where jsonpath functions, operators and
accessors should be described in?  On the one hand jsonpath functions
etc. are part of jsonpath datatype.  On the other hand it's functions
we apply to jsonb documents.

> There should also be a link to some of the original JSONPath spec
> https://goessner.net/articles/JsonPath/

We implement JSONPath according to SQL Standard 2016.  Your link
provides earlier attempt to implement jsonpath.  It's similar, but
some examples don't follow standard (and don't work in our
implementation).  For instance '$.store.book[(@.length-1)].title'
should be written as '$.store.book[last - 1] .title'.

> Thank you so much for putting so much work into the documentation! Please let me know if there are others way you
wouldlike to me help with the doc.
 

Thank you!  My main point is that we should put description of
jsonpath into single place.  But we need to reach consensus on what
this place should be.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: overhead due to casting extra parameters with aggregates (overand over)
Next
From: Mikael Kjellström
Date:
Subject: Re: scorpionfly needs more semaphores