Re: array_agg() NULL Handling - Mailing list pgsql-hackers

From Tom Lane
Subject Re: array_agg() NULL Handling
Date
Msg-id 27165.1283361145@sss.pgh.pa.us
Whole thread Raw
In response to Re: array_agg() NULL Handling  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: array_agg() NULL Handling  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> *** 1543,1549 ****
>       The first form of aggregate expression invokes the aggregate
>       across all input rows for which the given expression(s) yield
>       non-null values.  (Actually, it is up to the aggregate function
> !     whether to ignore null values or not — but all the standard ones do.)
>       The second form is the same as the first, since
>       <literal>ALL</literal> is the default.  The third form invokes the
>       aggregate for all distinct values of the expressions found
> --- 1543,1550 ----
>       The first form of aggregate expression invokes the aggregate
>       across all input rows for which the given expression(s) yield
>       non-null values.  (Actually, it is up to the aggregate function
> !     whether to ignore null values or not — but all the standard
> !     ones except <function>array_agg</> do.)
>       The second form is the same as the first, since
>       <literal>ALL</literal> is the default.  The third form invokes the
>       aggregate for all distinct values of the expressions found

I think when that text was written, it was meant to imply "all the
aggregates defined in SQL92".  There seems to be a lot of confusion
in this thread about whether "standard" means "defined by SQL spec"
or "built-in in Postgres".  Should we try to refine the wording to
clarify that?

Even more to the point, should we deliberately make this vaguer so that
we aren't finding ourselves with obsolete text again and again?  You can
bet that people adding new aggregates in the future aren't going to
think to update this sentence, any more than happened with array_agg.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: array_agg() NULL Handling
Next
From: "David E. Wheeler"
Date:
Subject: Re: array_agg() NULL Handling