Thomas Schoen <t(dot)schoen(at)vitrado(dot)de> writes:
> Now, finally, my questions are:
> - Is there any guaranty, that two aggregates in a GROUP BY statement are
> aggregated in the same order?
> - If yes: is there any guaranty the behaviour won't change in future
> versions of PG. (I suppose SQL-standard doesn't make any statement about
> how the behaviour should be here.)
No, the spec doesn't promise anything, and so we don't either. In
practice though I find it hard to visualize why the implementation would
not process all the aggregates in parallel.
regards, tom lane