| From: | Matemática A3K <matematica(dot)a3k(at)gmail(dot)com> |
|---|---|
| To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
| Cc: | "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [Minor] Possible missing syntax |
| Date: | 2026-11-07 00:28:39 |
| Message-ID: | CA+FDnhKrWaDxe2dXsike0_2vg+7Wbz+yoEOPHZ8EVFRwUTK8zA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
BUMP! :)
David - or anyone,
Can you review the attached patch with these changes?
Thanks!
On Mon, Oct 19, 2026 at 9:49 AM Matemática A3K <matematica(dot)a3k(at)gmail(dot)com> wrote:
>
> > After fixing, this "reads right":
> >
> > [{<literal><replaceable>index</replaceable></literal> | <literal><replaceable>start_index</replaceable> to <replaceable>end_index</replaceable></literal>}, ...]
> >
> > but it is not clear that the curly braces and the "or" are not part of the syntax, while the brackets are. How can this be stated? Is this what you referred with "the accessor requires the brackets where the forms of subscript did not"?
>
>
> Given the lack of symbols to express this synthetically, I think the
> original way is more readable but not "complete" in description.
>
> A more comprehensive description would be:
> "
> [subscript ...]
>
> Array element accessor. subscript can be given in two forms: index or
> start_index to end_index. The first form returns a single array
> element by its index. The second form returns an array slice by the
> range of indexes, including the elements that correspond to the
> provided start_index and end_index.
>
> Multiple subscripts are supported, provided that they are separated by a comma.
>
> The specified index can be an integer, as well as an expression
> returning a single numeric value, which is automatically cast to
> integer. Index zero corresponds to the first array element. You can
> also use the last keyword to denote the last array element, which is
> useful for handling arrays of unknown length.
>
> Indexes or range of indexes which do not correspond to the array's
> length are silently ignored.
> "
> (note the removed comma from the syntax, only second and fourth
> sentences are new)
>
> Do you think it is better?
| Attachment | Content-Type | Size |
|---|---|---|
| 00001_doc_improve_jsonb_path_query_array.patch | text/x-patch | 1.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matemática A3K | 2026-11-07 00:30:10 | Re: 4.1.4. Special Characters |
| Previous Message | Karen Jex | 2026-11-06 19:16:00 | Re: Good beginner doc-hacking task: clear-text vs. cleartext vs. clear text vs. plaintext etc.. |