tricky case: should we allow array element type to be composite/domain? currently seems to work fine.
create table t(b int[]); insert into t values ('{{1,3}}'), ('{{1,2}}'); select array_sort((select array_agg(t) from t), 'desc'); array_sort ----------------------------------- {"(\"{{1,3}}\")","(\"{{1,2}}\")"} select array_sort((t.b)) from t; ERROR: multidimensional arrays sorting are not supported select array_sort((select array_agg(t.b) from t)); ERROR: multidimensional arrays sorting are not supported