Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwJ4m-0002cu-46 for pgsql-docs@arkaria.postgresql.org; Fri, 07 Apr 2017 01:52:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cwJ4l-0005QU-HQ for pgsql-docs@arkaria.postgresql.org; Fri, 07 Apr 2017 01:52:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cwJ4k-0005Q7-Vl for pgsql-docs@postgresql.org; Fri, 07 Apr 2017 01:52:35 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cwJ4i-00004r-2m for pgsql-docs@postgresql.org; Fri, 07 Apr 2017 01:52:34 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1cwJ4g-0002iI-Bf; Thu, 06 Apr 2017 21:52:30 -0400 Date: Thu, 6 Apr 2017 21:52:30 -0400 From: Bruce Momjian To: "David G. Johnston" Cc: PostgreSQL-documentation Subject: Re: Window function docs Message-ID: <20170407015230.GE5757@momjian.us> References: <20170406214918.GA5757@momjian.us> <20170407011449.GC5757@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Thu, Apr 6, 2017 at 06:43:38PM -0700, David G. Johnston wrote: > On Thu, Apr 6, 2017 at 6:14 PM, Bruce Momjian 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 while > the built-in hypothetical-set ones are in Table 9-54. > > 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). I went with this, for simplicity: The built-in within-group ordered-set aggregate functions are listed in while the built-in within-group hypothetical-set ones are in . > 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. Yes, very complicated. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs