From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | John Lumby <johnlumby(at)hotmail(dot)com> |
Cc: | "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Subject: | Re: description of Aggregate Expressions |
Date: | 2019-12-06 19:17:35 |
Message-ID: | 382.1575659855@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-docs |
John Lumby <johnlumby(at)hotmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | John Lumby | 2019-12-06 20:01:14 | Re: description of Aggregate Expressions |
Previous Message | John Lumby | 2019-12-06 18:43:39 | Re: description of Aggregate Expressions |
From | Date | Subject | |
---|---|---|---|
Next Message | John Lumby | 2019-12-06 20:01:14 | Re: description of Aggregate Expressions |
Previous Message | John Lumby | 2019-12-06 18:43:39 | Re: description of Aggregate Expressions |