Re: Window function docs

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Window function docs
Date: 2017-04-07 01:43:38
Message-ID: CAKFQuwbaRiEZwi5qSVu8vx6xXW0VHCjgfTTSv-Vmd7nEPxwZLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, Apr 6, 2017 at 6:14 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Thu, Apr 6, 2017 at 03:53:24PM -0700, David G. Johnston wrote:
>
> > hypothetical-set aggregates as being distinct from ordered-set
> aggregates yet
> > the tables and the docs here do.
>
> Do you have any suggested text for that?
>

- ​The built-in ordered-set aggregate functions are listed in Table 9-53
and Table 9-54.
+ The built-in ordered-set aggregate functions are listed in Table 9-53
<https://www.postgresql.org/docs/9.6/static/functions-aggregate.html#FUNCTIONS-ORDEREDSET-TABLE>
while
the built-in hypothetical-set ones are in Table 9-54
<https://www.postgresql.org/docs/9.6/static/functions-aggregate.html#FUNCTIONS-HYPOTHETICAL-TABLE>
.

That's a direct translation. Reading some more, though, I think that:

+ The built-in within-group aggregate functions are listed in Table 9-53
(ordered-set) and Table 9-54 (hypothetical-set).

So now we'd have:

*grouping-aggregates:*
normal aggregates (no suffix modifiers, though can embed ORDER BY in the
aggregate function argument area)

*within-group aggregates (requires WITHIN GROUP suffix modifier)*
ordered-set aggregates -> given parameters determine a record value,
possibly imputed (within the defined group)
hypothetical-set aggregates -> given a (virtual) record determine a
parameter (within the defined group)

*non-grouping aggregates:*
window aggregates (requires OVER suffix modifier)

The CREATE AGGREGATE only names those three specific types in the notes
section.

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2017-04-07 01:52:30 Re: Window function docs
Previous Message Bruce Momjian 2017-04-07 01:14:49 Re: Window function docs