| From: | Matemática A3K <matematica(dot)a3k(at)gmail(dot)com> |
|---|---|
| To: | "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
| Subject: | [Minor] Possible missing syntax |
| Date: | 2026-10-15 16:12:36 |
| Message-ID: | CA+FDnh+3iDs-WdJFmqotZ_m622Uou8599nrJwM8xojzJ1Czptg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
In https://www.postgresql.org/docs/18/datatype-json.html#JSONB-SUBSCRIPTING
a row of the table says:
"
[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.
"
I infer from "[subscript, ...]" that several items can be specified. How
the range is specified is not clear to me since it can't be a comma as it
is the delimiter of arguments and something like "index_start to index_end"
("[2 to 3, 5 to 6]") seems unlikely.
I tried to find how it works in the source code but couldn't since I'm not
versed in C. If someone can find it and provide a clarification, I'll be
glad to propose a patch for it.
Thanks,
Rodrigo
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2026-10-15 16:37:09 | Re: [Minor] Possible missing syntax |
| Previous Message | Matemática A3K | 2026-10-12 15:32:37 | Re: ALTER SCHEMA: renaming does not update string-literal function bodies |