Re: description of Aggregate Expressions - Mailing list pgsql-docs

From John Lumby
Subject Re: description of Aggregate Expressions
Date
Msg-id DM6PR06MB5562ED9060C811718CC59605A35F0@DM6PR06MB5562.namprd06.prod.outlook.com
Whole thread Raw
In response to Re: description of Aggregate Expressions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: description of Aggregate Expressions  (John Lumby <johnlumby@hotmail.com>)
List pgsql-docs
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),
> >   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.
>

But surely not *all* cases of a multi-expression parameter list of an aggregate function are row constructors are
they?   What about 

select parent_id, name, GROUPING(parent_id , name), count(*) FROM mytable GROUP BY ROLLUP(parent_id , name);

In the piece "GROUPING(parent_id , name)" ,
  is "(parent_id , name)"  a row constructor or a list of two expressions?

Or are you saying those are one and the same thing?

Cheers,   John


pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: description of Aggregate Expressions
Next
From: John Lumby
Date:
Subject: Re: description of Aggregate Expressions