doc: improve description of subscripting of arrays
authorBruce Momjian
Mon, 31 Aug 2020 17:49:17 +0000 (13:49 -0400)
committerBruce Momjian
Mon, 31 Aug 2020 17:49:17 +0000 (13:49 -0400)
It wasn't clear the non-integers are cast to integers for subscripting,
rather than throwing an error.

Reported-by: [email protected]
Discussion: https://postgr.es/m/159538675800.624.7728794628229799531@wrigleys.postgresql.org

Backpatch-through: 9.5

doc/src/sgml/syntax.sgml

index ddc5ad3e30e7fcb1b03fc67ad33e559997a9a6fe..4977b980a6f9b99f09d778e4285776ea2b19e7b0 100644 (file)
@@ -1383,7 +1383,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.