Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:> It is maybe a bug. I cannot use ORDER BY clause in two parameter aggregate.
I think you don't understand the syntax. Put the aggregate argumentsfirst, then the ORDER BY.
regards, tom lane