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 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 &mdash; 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

Best,

David


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to