Re: Documentation, window functions

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Documentation, window functions
Date: 2010-09-22 16:54:45
Message-ID: AANLkTik3xiDTDrkj=0iM0NPj-6TUCMPFznRykQwbp7q0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/9/22 Dennis Björklund <db(at)zigo(dot)dhs(dot)org>:
> 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's true that avg() produce the same result no matter what order. A
> ORDER BY clause will affect what rows are included in the computation and
> thus change the result (the default window frame is
> RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW). So one can not in
> general add an ORDER BY to the example in the tutorial and get the same
> result as without an ORDER BY.
>
> 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 read it to the end.

Regards,

--
Hitoshi Harada

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2010-09-22 16:56:27 Re: Standby registration
Previous Message Bruce Momjian 2010-09-22 16:52:18 Re: Multi-branch committing in git, revisited