Specify non-default array subscripts in an array literal : Array Column Select « Array « PostgreSQL






Specify non-default array subscripts in an array literal

postgres=# -- Specify non-default array subscripts in an array literal
postgres=#
postgres=# SELECT f1[1][-2][3] AS e1, f1[1][-1][5] AS e2
postgres-# FROM (SELECT '[1:1][-2:-1][3:5]={{{1,2,3},{4,5,6}}}'::int[] AS f1) AS ss;
 e1 | e2
----+----
  1 |  6
(1 row)

postgres=#
postgres=#

           
       








Related examples in the same category

1.Use array constant in select statement
2.Using two dimension array
3.Selecting entire array values
4.Selecting array values with subscripts
5.Select array column by index
6.Selecting From a Multi-Dimensional Array
7.Accessing two dimensional Arrays
8.Reference array element
9.Searching in Arrays
10.Array Input and Output Syntax
11.SELECT ARRAY[1,2] || ARRAY[[3,4]] AS array