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

From Bruce Momjian
Subject Re: Subscript expressions do not have to evaluate to integers
Date
Msg-id 20200822003331.GN13363@momjian.us
Whole thread Raw
In response to Subscript expressions do not have to evaluate to integers  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: Subscript expressions do not have to evaluate to integers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
On Wed, Jul 22, 2020 at 02:59:18AM +0000, PG Doc comments form wrote:
> 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.

OK, how is the attached patch?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee


Attachment

pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: typo in sentence
Next
From: Tom Lane
Date:
Subject: Re: Subscript expressions do not have to evaluate to integers