Re: onlyvalue aggregate (was: First Aggregate Funtion?)

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Date: 2015-11-02 11:52:13
Message-ID: 56374E6D.5070807@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2015-11-02 12:12:21 Re: eXtensible Transaction Manager API
Previous Message Dean Rasheed 2015-11-02 11:40:39 Re: onlyvalue aggregate (was: First Aggregate Funtion?)