| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | sean(at)materialize(dot)io, pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Subscript expressions do not have to evaluate to integers |
| Date: | 2020-08-22 00:33:31 |
| Message-ID: | 20200822003331.GN13363@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
| Attachment | Content-Type | Size |
|---|---|---|
| array.diff | text/x-diff | 501 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2020-08-22 01:22:31 | Re: Subscript expressions do not have to evaluate to integers |
| Previous Message | Bruce Momjian | 2020-08-22 00:24:52 | Re: typo in sentence |