For example, if you use a column reference when your constructing an array, like this:

    SELECT ARRAY[1, 2.2, v] FROM t;

Note that in your code above, you need to loop first through the children to find out the common base type of the array. For example, in this example here, the array will end up being a DECIMAL_ARRAY because the common base type of the INTEGER 1 and the DECIMAL 2.2 is a DECIMAL. You can't assume that the first child type will determine the array type.

You could also do an upsert select, like this:

    UPSERT INTO t(k,a)
    SELECT k, ARRAY[1, 2.2, a] FROM t WHERE k=1;