On Sep 1, 2010, at 11:09 AM, Pavel Stehule wrote:
> Then you can eliminate NULLs with simple function
>
> CREATE OR REPLACE FUNCTION remove_null(anyarray)
> RETURNS anyarray AS $$
> SELECT ARRAY(SELECT x FROM unnest($1) g(x) WHERE x IS NOT NULL)
> $$ LANGUAGE sql;
Kind of defeats the purpose of the efficiency of the aggregate.
Best,
David
In response to
Responses
pgsql-hackers by date
| Next: | From: Tom Lane | Date: 2010-09-01 18:23:32 |
| Subject: Re: array_agg() NULL Handling |
| Previous: | From: Pavel Stehule | Date: 2010-09-01 18:09:48 |
| Subject: Re: array_agg() NULL Handling |