Noah Misch said:
> Other aggregates based on this syntax might not desire such type unification.
Then there would have to be some way to distinguish that. Maybe those could
have -1 and the standard hypothetical set functions -2, with some flag in
CREATE AGGREGATE to sort it out.
> Having parse an
Ok, since Atri posted our work-so-far and there's not been much
comment, I'll outline here my proposed plan of attack.
Rather than, as in the WIP patch, using the agg finalfn to validate
the split between normal args and ORDER BY args, I propose this:
Firstly, as in the WIP patch,
func(a) with
Josh Berkus wrote:
> Hah, I didn't realize that our ordered aggregate syntax even *was* spec.
The spec defines agg(x order by y) only for array_agg and xmlagg; the
generalization to arbitrary other aggregates is our extension. (But
kind of obvious really.)
> > Our implementation does heavily reus
Josh Berkus wrote:
> On 07/17/2013 08:15 PM, Andrew Gierth wrote:
> > The spec defines two types of aggregate function classed as "ordered set
> > function", as follows:
> >
> > 1. An "inverse distribution function" taking one argument (which must be
> >a grouped column or otherwise constant
On 07/17/2013 08:15 PM, Andrew Gierth wrote:
> The spec defines two types of aggregate function classed as "ordered set
> function", as follows:
>
> 1. An "inverse distribution function" taking one argument (which must be
>a grouped column or otherwise constant within groups) plus a sorted
>
The spec defines two types of aggregate function classed as "ordered set
function", as follows:
1. An "inverse distribution function" taking one argument (which must be
a grouped column or otherwise constant within groups) plus a sorted
group with exactly one column:
=# SELECT (func(p)