Re: Patch: Improve Boolean Predicate JSON Path Docs

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Patch: Improve Boolean Predicate JSON Path Docs
Дата
Msg-id 9DFFFF51-4C38-4311-A6E7-7467DA7BB642@justatheory.com
обсуждение исходный текст
Ответ на Re: Patch: Improve Boolean Predicate JSON Path Docs  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: Patch: Improve Boolean Predicate JSON Path Docs
Список pgsql-hackers
On Oct 22, 2023, at 20:36, Erik Wienhold <ewie@ewie.name> wrote:

> That's an AppleSingle file according to [1][2].  It only contains the
> resource fork and file name but no data fork.

Ah, I had “Send large attachments with Mail Drop” enabled. To me 20K is not big but whatever. Let’s see if turning it
offfixes the issue. 

> Any reason for calling it "predicate check expressions" (e.g. the link
> text) and sometimes "predicate path expressions" (e.g. the linked
> section title)?  I think it should be named consistently to avoid
> confusion and also to simplify searching.

I think "predicate path expressions” is more descriptive, but "predicate check expressions” is what was in the docs
before,so let’s stick with that. 

> Linking the same section twice in the same paragraph seems excessive.

Fair. Will link the second one.

>> +<prompt>=></prompt> <userinput>select jsonb_path_query(:'json', '$.track.segments');</userinput>
>> +select jsonb_path_query(:'json', '$.track.segments');
>
> Please remove the second SELECT.

Done.

>> +<prompt>=></prompt> <userinput>select jsonb_path_query(:'json', 'strict
$.track.segments[0].location');</userinput>
>> + jsonb_path_query
>> +-------------------
>> + [47.763, 13.4034]
>
> Strict mode is unnecessary to get that result and I'd omit it because
> the different modes are not introduced yet at this point.

Yep, pasto.

> Strict mode is unnecessary here as well.

Fixed.

>> +     using the lax mode. To avoid surprising results, we recommend using
>> +     the <literal>.**</literal> accessor only in the strict mode. The
>
> Please change to "in strict mode" (without "the").

Hrm, I prefer it without the article, too, but it is consistently used that way elsewhere, like here:

 https://github.com/postgres/postgres/blob/5b36e8f/doc/src/sgml/func.sgml#L17401

I’d be happy to change them all, but was keeping it consistent for now.

Updated patch attached, thank you!

David


Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: interval_ops shall stop using btequalimage (deduplication)
Следующее
От: David Rowley
Дата:
Сообщение: Re: Use virtual tuple slot for Unique node