Overvej hele castet af denne western, før du afskriver den:
WITH tbl(arr) AS (SELECT (ARRAY[[10,11],[20,21]]))
SELECT arr[2][1] AS the_good
,arr[1] AS the_bad
,arr[1:1] AS the_ugly -- first slice of 2D-array
,arr[1][1:2] AS the_ugly_twin -- 2D-array with elements 1 & 2 of 1st slice
,ARRAY((SELECT unnest(arr[1:1]))) AS the_righteous -- 1D-array of 1st slice
FROM tbl;
->sqlfiddle med flere eksempler.
Lidt baggrund i manualen her og her .