Re: array_agg() NULL Handling

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: array_agg() NULL Handling
Дата
Msg-id F9D43A22-AB3F-4329-BF65-C9E7CD4A3400@kineticode.com
обсуждение исходный текст
Ответ на Re: array_agg() NULL Handling  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: array_agg() NULL Handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sep 1, 2010, at 12:30 AM, Pavel Stehule wrote:

>> So are the docs right, or is array_agg() right?
>
> Docs is wrong :) I like current implementation. You can remove a NULLs
> from aggregation very simply, but different direction isn't possible

Patch:

diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
index 9f91939..e301019 100644
*** a/doc/src/sgml/syntax.sgml
--- b/doc/src/sgml/syntax.sgml
*************** sqrt(2)
*** 1543,1549 ****     The first form of aggregate expression invokes the aggregate     across all input rows for which
thegiven 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
thefirst, since     <literal>ALL</literal> is the default.  The third form invokes the     aggregate for all distinct
valuesof the expressions found 
--- 1543,1550 ----     The first form of aggregate expression invokes the aggregate     across all input rows for which
thegiven 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
expressionsfound 

Best,

David



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Synchronous replication - patch status inquiry
Следующее
От: Tom Lane
Дата:
Сообщение: Re: array_agg() NULL Handling