Suggestion for docs, section "4.2.3 Subscripts": bounds and base - Mailing list pgsql-docs

From PG Doc comments form
Subject Suggestion for docs, section "4.2.3 Subscripts": bounds and base
Date
Msg-id 174370454407.3115968.6902015899222362259@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Suggestion for docs, section "4.2.3 Subscripts": bounds and base
Re: Suggestion for docs, section "4.2.3 Subscripts": bounds and base
List pgsql-docs
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.

pgsql-docs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Mention the default io_method?
Next
From: PG Doc comments form
Date:
Subject: generated constraint name