Subscript expressions do not have to evaluate to integers - Mailing list pgsql-docs

From PG Doc comments form
Subject Subscript expressions do not have to evaluate to integers
Date
Msg-id 159538675800.624.7728794628229799531@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Subscript expressions do not have to evaluate to integers  (Bruce Momjian <bruce@momjian.us>)
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/sql-expressions.html
Description:

Section 4.2.3. Subscripts of the documentation states:

> Each subscript is itself an expression, which must yield an integer
value.

However, the following query works on Postgres 12.1

SELECT (ARRAY[1, 2, 3]::integer[])[1.5];

 array
-------
     2

I believe a more appropriate statement would acknowledge that at least some
values undergo an explicit-style conversion to an integer.

pgsql-docs by date:

Previous
From: PASCAL CROZET
Date:
Subject: RE: Additional Chapter for Tutorial
Next
From: Jürgen Purtz
Date:
Subject: Import an XML file