Re: Patch: Improve Boolean Predicate JSON Path Docs

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Patch: Improve Boolean Predicate JSON Path Docs
Date: 2023-10-23 22:58:18
Message-ID: 9DFFFF51-4C38-4311-A6E7-7467DA7BB642@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 22, 2023, at 20:36, Erik Wienhold <ewie(at)ewie(dot)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 off fixes 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>=&gt;</prompt> <userinput>select jsonb_path_query(:'json', '$.track.segments');</userinput>
>> +select jsonb_path_query(:'json', '$.track.segments');
>
> Please remove the second SELECT.

Done.

>> +<prompt>=&gt;</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

Attachment Content-Type Size
v6-0001-Improve-boolean-predicate-JSON-Path-docs.patch application/octet-stream 19.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-10-23 22:59:52 Re: Use virtual tuple slot for Unique node
Previous Message Peter Geoghegan 2023-10-23 22:53:24 Re: interval_ops shall stop using btequalimage (deduplication)