Re: array_agg() NULL Handling

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: array_agg() NULL Handling
Дата
Msg-id 27165.1283361145@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: array_agg() NULL Handling  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: array_agg() NULL Handling  ("David E. Wheeler" <david@kineticode.com>)
Список 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 по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: array_agg() NULL Handling
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: array_agg() NULL Handling