Movatterモバイル変換


[0]ホーム

URL:


Quick Links

Subscript expressions do not have to evaluate to integers

From:PG Doc comments form <noreply(at)postgresql(dot)org>
To:pgsql-docs(at)lists(dot)postgresql(dot)org
Cc:sean(at)materialize(dot)io
Subject:Subscript expressions do not have to evaluate to integers
Date:2020-07-22 02:59:18
Message-ID:159538675800.624.7728794628229799531@wrigleys.postgresql.org
Views:Whole Thread |Raw Message |Download mbox |Resend email
Thread:
Lists: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.

Responses

Browse pgsql-docs by date

 FromDateSubject
Next MessageJürgen Purtz2020-07-22 08:33:22Import an XML file
Previous MessagePASCAL CROZET2020-07-21 23:49:08RE: Additional Chapter for Tutorial

[8]ページ先頭

©2009-2026 Movatter.jp