Re: description of Aggregate Expressions

2019-12-06 Thread John Lumby
John Lumby wrote: < < Tom Lane wrote < < > > 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 tha

Re: description of Aggregate Expressions

2019-12-06 Thread John Lumby
Tom Lane wrote > > 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),

Re: description of Aggregate Expressions

2019-12-06 Thread Tom Lane
John Lumby 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. >

Re: description of Aggregate Expressions

2019-12-06 Thread John Lumby
On 12/05/19 18:06, David G. Johnston wrote: On Thu, Dec 5, 2019 at 3:18 PM John Lumby <johnlu...@hotmail.com> wrote: In PostgreSQL 12.1 Documentation chapter 4.2.7. Aggregate Expressions it says The syntax of an aggregate expression i

Re: description of Aggregate Expressions

2019-12-05 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Dec 5, 2019 at 3:18 PM John Lumby wrote: >> whereas >> select count(DISTINCT ( parent_id , name) ) from mytable >> is accepted. > Correct, converting the two individual columns into a "tuple" allows the > default tuple distinct-making infrastructure to be us

Re: description of Aggregate Expressions

2019-12-05 Thread David G. Johnston
On Thu, Dec 5, 2019 at 3:18 PM John Lumby wrote: > In PostgreSQL 12.1 Documentation chapter 4.2.7. Aggregate Expressions it > says > > > The syntax of an aggregate expression is one of the following: > ... > aggregate_name (DISTINCT expression [ , ... ] [ order_by_clause ] ) [ > FILTER ( WHERE

description of Aggregate Expressions

2019-12-05 Thread John Lumby
In PostgreSQL 12.1 Documentation chapter 4.2.7. Aggregate Expressions it says The syntax of an aggregate expression is one of the following: ... aggregate_name (DISTINCT expression [ , ... ] [ order_by_clause ] ) [ FILTER ( WHERE filter_clause ) ] ... I believe this is incorrect in the case