Hello Sergei,
> Aggregate functions have syntax for ordering: just "select array_agg(i order by i) from ...."
> Described here: https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-AGGREGATES
Great, that's indeed enough for my usage, thanks for the tip!
The questions remains, why not provide an "array_sort", which could be
useful in other contexts?
--
Fabien.