Martijn van Oosterhout <kleptog@xxxxxxxxx> writes: > The main thing I want to use them for is for cumulative output. > ... > With window functions you define for each row a "window" which is from > the beginning of the table to that row and then sum the values, for > each row. Then you just divide by the total, nice. Egad. Wouldn't that involve O(N) memory and O(N^2) operations? Perhaps an extremely smart optimizer could improve this using knowledge of the specific aggregates' behaviors, but for "black box" aggregates it sounds pretty unworkable. regards, tom lane