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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Tiikkaja <marko(at)joh(dot)to>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Date: 2015-10-28 17:59:52
Message-ID: CAFj8pRBOhM_Z9gjMLHci=_kFAP6F84=Ryk-hFa6FqzCgOnKXRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-10-28 18:38 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Marko Tiikkaja <marko(at)joh(dot)to> writes:
> > Here's a patch for the aggregate function outlined by Corey Huinker in
> > CADkLM=foA_oC_Ri23F9PbfLnfwXFbC3Lt8bBzRu3=CB77G9_qw(at)mail(dot)gmail(dot)com . I
> > called it "onlyvalue", which is a horrible name, but I have nothing
> > better to offer. (Corey called it "only", but that doesn't really work
> > since ONLY is a fully reserved keyword.)
>
> On the name front, maybe think "single" rather than "only"? This might
> lead to "single()" or "single_value()", or "singleton()" if you want to
> sound highbrow.
>

this function should to have some distinguish name than other aggregates
because important work of this func is not some calculation but some
constraint check.

> On the semantics front, I'm not sure that I like excluding nulls from the
> input domain. I'd rather that it acted like IS NOT DISTINCT, ie, nulls
> are fine as long as all the input values are nulls. The implementation
> would need some work for that.
>
> regards, tom lane
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2015-10-28 18:44:58 Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Previous Message Jim Nasby 2015-10-28 17:54:54 pgxs/config/missing is... missing