pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Lumby <johnlumby@hotmail.com>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: description of Aggregate Expressions
Date: Fri, 06 Dec 2019 14:17:35 -0500
Message-ID: <382.1575659855@sss.pgh.pa.us> (raw )
In-Reply-To: <DM6PR06MB55621D8E8B9C786DAA6BA077A35F0@DM6PR06MB5562.namprd06.prod.outlook.com >
References: <2A91BEF8171A5349931391E0C721CC5375705457@CPEMS-KPN501.KPNCNL.LOCAL >
<251962385fdc49da0da54e22588aabd6fbc2e0fa.camel@osdev.nl >
<2A91BEF8171A5349931391E0C721CC53757054D3@CPEMS-KPN501.KPNCNL.LOCAL >
<2CB4B3C9-F43F-49D8-A594-93DBE99EF514@elevated-dev.com >
<7308f0f3a1674a39bada8571189a3735@CPEMS-KPN509.KPNCNL.LOCAL >
<91CEBEAA-7260-4503-832F-E5B27B91BE1F@elevated-dev.com >
<2A91BEF8171A5349931391E0C721CC5375705528@CPEMS-KPN501.KPNCNL.LOCAL >
<E813B7F6-B641-4739-A209-F0352A780EF8@elevated-dev.com >
<2A91BEF8171A5349931391E0C721CC53757055C3@CPEMS-KPN501.KPNCNL.LOCAL >
<DM6PR06MB55622DFEE2755236B8A810A0A35C0@DM6PR06MB5562.namprd06.prod.outlook.com >
<CAKFQuwZk3Kt4uNktMgLYj5B1Rzrm1R4EMVZQRka189AhnPkM=Q@mail.gmail.com >
<DM6PR06MB55621D8E8B9C786DAA6BA077A35F0@DM6PR06MB5562.namprd06.prod.outlook.com >
John Lumby <johnlumby@hotmail.com> writes:
> On 12/05/19 18:06, David G. Johnston wrote:
>> Then I would have to say the proposed solution to this edge case is worse than the problem. I also don't expect there to be a clean solution to dealing with the complexities of expressions at the syntax diagram level.
> Yes, I see what I suggested is not ideal either. But I think something needs to be changed.
> How about replacing "expression [ , ... ]" by "parameter_list" in the description, and then stating that parameter_list can be either a single expression or , if the particular aggregate function accepts it (for which, consult that function's reference), a comma -separated list of expressions.
That's just as wrong. As we tried to explain before, the
parenthesized-list syntax is a row constructor, so it only works
in cases where the aggregate function can accept a composite
argument type. Most don't.
Moreover, the very same thing holds in *any* expression context,
not only aggregate arguments. So if we took this seriously there
would have to be a lot of other places plastered with equally
confusing/unhelpful addenda.
regards, tom lane
view thread (7+ messages) latest in thread
Message-ID: <382.1575659855@sss.pgh.pa.us>
Permalink: ../382.1575659855@sss.pgh.pa.us/
Also on: postgresql.org/message-id/382.1575659855@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, johnlumby@hotmail.com, pgsql-docs@lists.postgresql.org, david.g.johnston@gmail.com
Subject: Re: description of Aggregate Expressions
In-Reply-To: <382.1575659855@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox