array_agg() NULL Handling
От | David E. Wheeler |
---|---|
Тема | array_agg() NULL Handling |
Дата | |
Msg-id | 770F1292-EC1C-4EEA-A315-186BC5AF3A40@kineticode.com обсуждение исходный текст |
Ответы |
Re: array_agg() NULL Handling
Re: array_agg() NULL Handling |
Список | pgsql-hackers |
The aggregate docs say: > The first form of aggregate expression invokes the aggregate across all input rows for which the given expression(s) yieldnon-null values. (Actually, it is up to the aggregate function whether to ignore null values or not — but all the standardones do.) -- http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-AGGREGATES That, however, is not true of array_agg(): try=# CREATE TABLE foo(id int); CREATE TABLE try=# INSERT INTO foo values(1), (2), (NULL), (3); INSERT 0 4 try=# select array_agg(id) from foo; array_agg ──────────────{1,2,NULL,3} (1 row) So are the docs right, or is array_agg() right? Best, David
В списке pgsql-hackers по дате отправления: