Clarify note about DISTINCT and ORDER BY in aggregates

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: pgsql-docs(at)postgresql(dot)org
Subject: Clarify note about DISTINCT and ORDER BY in aggregates
Date: 2022-12-08 12:31:24
Message-ID: 8e9e35a2-5f15-cb26-f473-fc590867a9f5@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The current docs can be read as using DISTINCT in an aggregate
(count(distinct col)) and ORDER BY (array_agg(col ORDER BY col)) are
both extensions to the standard.

The actual truth is that our extension to the standard is to allow both
at the same time.

Attached is a trivial patch to make that more clear. I don't know if
pgindent works on the docs so I made this so as to show what is
changing. I can submit a properly formatted patch, or let the eventual
committer make that change if necessary.
--
Vik Fearing

Attachment Content-Type Size
clarify-aggregate-distinct-orderby.diff text/x-patch 498 bytes

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2022-12-08 14:15:19 Re: nextval parameter is not clear
Previous Message David G. Johnston 2022-12-07 21:32:34 Re: nextval parameter is not clear