On Sun, 7 Mar 2021 at 23:24, Pavel Stehule <pavel.steh...@gmail.com> wrote: The mandatory ORDER BY clause should be necessary for operations when the result depends on the order. You need an order for calculation of median. And you don't need to know an order for average. More if the result is one number and is not possible to do a visual check of correctness (like median).
I really don't think so. # create table f (f float not null); # insert into f values(1e100),(-1e100),(1.5); # select sum(f order by f) from f; sum ----- 0 (1 row) # select sum(f) from f; sum ----- 1.5 (1 row) Users are going to be pretty annoyed with us if we demanded that they include an ORDER BY for that query. Especially so since our ORDER BY aggregate implementation still has no planner support. David