=?ISO-8859-2?Q?Rafa=B3_Pietrak?= <rafal@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general