Re: onlyvalue aggregate (was: First Aggregate Funtion?) - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Date
Msg-id 56374E6D.5070807@joh.to
Whole thread Raw
In response to Re: onlyvalue aggregate (was: First Aggregate Funtion?)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: onlyvalue aggregate (was: First Aggregate Funtion?)  (Marko Tiikkaja <marko@joh.to>)
List pgsql-hackers
On 11/2/15 12:40 PM, Dean Rasheed wrote:
> I'm not sure what you mean when you say accepting NULLs can hide bugs.
> I think that if the input values to the aggregate were
> 1,1,1,NULL,1,1,1 then it should raise an error. ITSM that that is more
> likely to reveal problems with your underlying data or the query. If
> you want to ignore NULLs, you can always add a FILTER(WHERE val IS NOT
> NULL) clause.

Ah, I see.  So you're arguing that the aggregate should accept NULLs as 
input, but consider them distinct from any non-NULL values.  I thought 
you meant accepting NULLs and *not* considering them distinct, which 
could easily hide problems.

In that case, I don't oppose to changing the behavior.  I'll make the 
necessary changes.


.m



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Next
From: Konstantin Knizhnik
Date:
Subject: Re: eXtensible Transaction Manager API