Re: Documentation error in tutorial page for Window Functions

From: Scott Preschern <shineondarkside(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Documentation error in tutorial page for Window Functions
Date: 2024-11-12 20:33:25
Message-ID: CAGDjFt_0P_+-Hfp144iDYHb0oWogAYqQZ2LYzABGPunRSVOmPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Thanks, I see now. Then I'll suggest this clarification instead:

"The rank function produces a numerical rank for each distinct value in the
ORDER BY clause within the current row's partition. In this example, ranks
are incremented in order of salary within each partition of depname. If the
ORDER BY clause refers to multiple columns, the rank is incremented at each
unique combination of those columns. rank needs no explicit parameter,
because its behavior is entirely determined by the OVER clause."

Scott

On Mon, Nov 11, 2024 at 5:39 AM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

>
>
> On Sunday, November 10, 2024, PG Doc comments form <noreply(at)postgresql(dot)org>
> wrote:
>
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/17/tutorial-window.html
>> Description:
>>
>> In Section 3.5 Window Functions, the sentence that currently says:
>> "As shown here, the rank function produces a numerical rank for each
>> distinct ORDER BY value in the current row's partition..."
>>
>> should say:
>> "As shown here, the rank function produces a numerical rank for each
>> distinct depname value in the current row's partition..."
>>
>> https://www.postgresql.org/docs/current/tutorial-window.html
>>
>
> If we wanted to name the relevant column it would be salary, not depname.
> It is the column(s) in the order by that matter here. Or I suppose the
> combination of depname and salary. Though it was already covered that each
> partition resets all aggregates. Here we are not talking about reset but
> when something increments.
>
> David J.
>
>

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Bear Giles 2024-11-12 21:50:11 Re: Improved security for https://www.postgresql.org/docs/current/install-make.html
Previous Message Daniel Gustafsson 2024-11-12 12:11:51 Re: A minor bug in doc. Hovering over heading shows # besides it.