postgres.git / summary / log / commit / refs

commit    58eb1760baa67a36e71b26f9ed2ddc86a1cac03d
Author:   Bruce Momjian <bruce@momjian.us>
Date:     Mon Aug 31 17:49:17 2020 +0000
First released in: 14.0, 9.5.24, 9.6.20, 10.15, 11.10, 12.5, 13.0

    doc:  improve description of subscripting of arrays
    
    It wasn't clear the non-integers are cast to integers for subscripting,
    rather than throwing an error.
    
    Reported-by: sean@materialize.io
    
    Discussion: https://postgr.es/m/159538675800.624.7728794628229799531@wrigleys.postgresql.org
    
    Backpatch-through: 9.5


doc/src/sgml/syntax.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index b7fae363fb3..e16721107d7 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1383,7 +1383,7 @@ CREATE FUNCTION dept(text) RETURNS dept </synopsis> (Here, the brackets <literal>[ ]</literal> are meant to appear literally.) Each <replaceable>subscript</replaceable> is itself an expression, - which must yield an integer value. + which will be rounded to the nearest integer value. </para> <para> [parent: a76d83a00a91]