From 8006ac1c5117a56fcd138d663a3fe3709c8f9988 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 31 Aug 2020 13:49:17 -0400 Subject: [PATCH] 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 0ee303cb87..b0ae5d2e12 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1359,7 +1359,7 @@ CREATE FUNCTION dept(text) RETURNS dept (Here, the brackets [ ] are meant to appear literally.) Each subscript is itself an expression, - which must yield an integer value. + which will be rounded to the nearest integer value.