agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
Documentation error in tutorial page for Window Functions
3+ messages / 3 participants
[nested] [flat]

* Documentation error in tutorial page for Window Functions
@ 2024-11-11 01:08 PG Doc comments form <noreply@postgresql.org>
  2024-11-11 13:39 ` Re: Documentation error in tutorial page for Window Functions David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2024-11-11 01:08 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: shineondarkside@gmail.com

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

Thanks for the otherwise great tutorial.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Documentation error in tutorial page for Window Functions
  2024-11-11 01:08 Documentation error in tutorial page for Window Functions PG Doc comments form <noreply@postgresql.org>
@ 2024-11-11 13:39 ` David G. Johnston <david.g.johnston@gmail.com>
  2024-11-12 20:33   ` Re: Documentation error in tutorial page for Window Functions Scott Preschern <shineondarkside@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2024-11-11 13:39 UTC (permalink / raw)
  To: shineondarkside@gmail.com <shineondarkside@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Sunday, November 10, 2024, PG Doc comments form <noreply@postgresql.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.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Documentation error in tutorial page for Window Functions
  2024-11-11 01:08 Documentation error in tutorial page for Window Functions PG Doc comments form <noreply@postgresql.org>
  2024-11-11 13:39 ` Re: Documentation error in tutorial page for Window Functions David G. Johnston <david.g.johnston@gmail.com>
@ 2024-11-12 20:33   ` Scott Preschern <shineondarkside@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Scott Preschern @ 2024-11-12 20:33 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

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.g.johnston@gmail.com> wrote:

>
>
> On Sunday, November 10, 2024, PG Doc comments form <noreply@postgresql.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.
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-11-12 20:33 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-11-11 01:08 Documentation error in tutorial page for Window Functions PG Doc comments form <noreply@postgresql.org>
2024-11-11 13:39 ` David G. Johnston <david.g.johnston@gmail.com>
2024-11-12 20:33   ` Scott Preschern <shineondarkside@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox