How do I convert a column containing array values into separate columns:
Multiple rows, one column
{100,67,9}
{100,100}
{100,100,100}
{100,9}
Multiple rows, multiple columns
100 67 9
100 100
100 100 100
100 9
A SQL query has a fixed set of columns. If you know the maximum number, then just extract the values:
select t.ar[1] as col1, t.ar[2] as col2, t.ar[3] as col3
from t;
If you don't know how many columns will be in the result set, then you would need to use dynamic SQL.
Here is a db<>fiddle.