agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: s@xss.de
Subject: Suggestion for docs, section "4.2.3 Subscripts": bounds and base
Date: Thu, 03 Apr 2025 18:22:24 +0000
Message-ID: <174370454407.3115968.6902015899222362259@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/17/sql-expressions.html
Description:
I skimmed over section 4.2 while waiting for a meeting to start and found no
mention of the following two questions that immediately pop up in my mind
when subscripts are mentionned:
Are subscripts 0-based or 1-based?
Are slice boundaries inclusive or exclusive?
Suggestion:
...
`expression[subscript]`
where by default the subscript is counted from 1. A contiguous slice of
array elements can be extracted by using the subscript of the first and last
element to be included in the slice:
`expression[first_included_subscript:last_included_subscript]`
Regards,
s.
view thread (3+ messages) latest in thread
Message-ID: <174370454407.3115968.6902015899222362259@wrigleys.postgresql.org>
Permalink: ../174370454407.3115968.6902015899222362259@wrigleys.postgresql.org/
Also on: postgresql.org/message-id/174370454407.3115968.6902015899222362259@wrigleys.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, s@xss.de
Subject: Re: Suggestion for docs, section "4.2.3 Subscripts": bounds and base
In-Reply-To: <174370454407.3115968.6902015899222362259@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox