On Sep 12 04:46, Steven Murdoch wrote:
> I would like to concatenate sorted strings in an aggregate function. I
> found a way to do it without sorting[1], but not with.
If the array elements will be made of integers, then you can use sort()
procedure comes with intarray contrib module. For instance,
SELECT concat(T.sorted_arr) FROM (SELECT sort(arr) FROM tbl) AS T (sorted_arr);
If related column will also include text values, you can create a
suitable sort() procedure for text[] type and use it instead.
Regards.