Re: [HACKERS] Documentation, window functions

2011-02-19 Thread Bruce Momjian
Robert Haas wrote: > On Thu, Sep 23, 2010 at 11:34 PM, Dennis Bj?rklund wrote: > >> On Wed, Sep 22, 2010 at 6:03 AM, Dennis Bj?rklund > >> wrote: > >> But I confess that I'm sort of murky on how ORDER affects the window > >> frame, or how to rephrase this more sensibly. > > > > The rows included

Re: [HACKERS] Documentation, window functions

2010-09-26 Thread Kevin Grittner
Robert Haas wrote: > Hmm... it is true that average will produce the same results on any > ordering of the same set of input values, though. Not exactly. For floating point approximations you get a more accurate sum (and therefore a more accurate average) if you add the values in ascending or

Re: [HACKERS] Documentation, window functions

2010-09-26 Thread Dennis Björklund
> Hmm... it is true that average will produce the same results on any > ordering of the same set of input values, though. Perhaps the word > "partition" emcompass that, though then again maybe not. > > I'd be happy to fix this if I understand what to fix it to. I wish I knew how to rephrase it so

Re: [HACKERS] Documentation, window functions

2010-09-26 Thread Robert Haas
On Thu, Sep 23, 2010 at 11:34 PM, Dennis Björklund wrote: >> On Wed, Sep 22, 2010 at 6:03 AM, Dennis Björklund wrote: >> But I confess that I'm sort of murky on how ORDER affects the window >> frame, or how to rephrase this more sensibly. > > The rows included in the calculation of the window fun

Re: [HACKERS] Documentation, window functions

2010-09-23 Thread Dennis Björklund
> On Wed, Sep 22, 2010 at 6:03 AM, Dennis Björklund wrote: > But I confess that I'm sort of murky on how ORDER affects the window > frame, or how to rephrase this more sensibly. The rows included in the calculation of the window function are per default RANGE BETWEEN UNBOUNDED PRECEDING AND CURR

Re: [HACKERS] Documentation, window functions

2010-09-22 Thread Alvaro Herrera
Excerpts from Hitoshi Harada's message of mié sep 22 12:54:45 -0400 2010: > > Maybe we can find some better wording of the above? > > Your point is true, but I believe it's still ok because the section is > a tutorial for novices. If you start to explain everything here, > readers don't want to r

Re: [HACKERS] Documentation, window functions

2010-09-22 Thread Hitoshi Harada
2010/9/22 Dennis Björklund : > In > >  http://www.postgresql.org/docs/9.0/static/tutorial-window.html > > it say > > "Although avg will produce the same result no matter what order it > processes the partition's rows in, this is not true of all window > functions. When needed, you can control that

Re: [HACKERS] Documentation, window functions

2010-09-22 Thread Robert Haas
On Wed, Sep 22, 2010 at 6:03 AM, Dennis Björklund wrote: > In > >  http://www.postgresql.org/docs/9.0/static/tutorial-window.html > > it say > > "Although avg will produce the same result no matter what order it > processes the partition's rows in, this is not true of all window > functions. When

[HACKERS] Documentation, window functions

2010-09-22 Thread Dennis Björklund
In http://www.postgresql.org/docs/9.0/static/tutorial-window.html it say "Although avg will produce the same result no matter what order it processes the partition's rows in, this is not true of all window functions. When needed, you can control that order using ORDER BY within OVER." While it