The array_split() function parses the input for elements separated by a delimiter to create an array.
array = array_split(varchar input, varchar delimiter [, [int type]);
array = array_split(nvarchar input, nchar delimiter [, [int type]);
The input value specifies a character delimited list of elements.
The delimiter value specifies the delimiter used in the input.
The optional type value specifies the type of the array; the type defaults to varchar.
select array_split('1,2,3,4,5,6,7,8',',');
array_split
-------------
ARR
(1 row)
select array_combine(array_split('1,2,3,4,5,6,7,8',','),'|');
array_combine
-----------------
1|2|3|4|5|6|7|8
(1 row)