=?ISO-8859-2?Q?Rafa=B3_Pietrak?= <rafal(at)ztk-rp(dot)eu> writes:
> array_agg(distinct v order by v) -- works in postgres, but actually I need:
> array_agg(distinct v order by v,x) -- which doesn't. (ERROR:
> ....expressions must appear in argument list),
Why do you think you need that? AFAICS, the extra order-by column could
not in any way affect the result of the operation.
regards, tom lane