Re: JSONPATH documentation

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: JSONPATH documentation
Дата
Msg-id CAMkU=1ymTcCqUwwuoDS3+C8GCFFweanOXZXF6OVyC=m3rrGe_w@mail.gmail.com
обсуждение исходный текст
Ответ на JSONPATH documentation  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On Sun, Sep 22, 2019 at 2:18 PM Jeff Janes <jeff.janes@gmail.com> wrote:
I find the documentation in  https://www.postgresql.org/docs/12/functions-json.html very confusing.

In table 9.44 take the first entry, 

Example JSON
 {"x": [2.85, -14.7, -9.4]}  

Example Query
  + $.x.floor()  

Result
2, -15, -10

There are no end to end examples here. How do I apply the example query to the example json to obtain the given result?

OK, never mind here.  After digging in the regression tests, I did find jsonb_path_query and friends, and they are in the docs with examples in table 9.49.  I don't know how I overlooked that in the first place, I guess I was fixated on operators.  Or maybe by the time I was down in those functions, I thought I had cycled back up and was looking at 9.44 again.  But I think it would make sense to move the description of jsonpath to its own page.  It is confusing to have operators within the jsonpath language, and operators which apply to jsonpath "from the outside", together in the same page.

Cheers,

Jeff

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [bug fix??] Fishy code in tts_cirtual_copyslot()
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: JSONPATH documentation