From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Marko Tiikkaja <marko(at)joh(dot)to> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: onlyvalue aggregate (was: First Aggregate Funtion?) |
Date: | 2015-10-30 09:33:42 |
Message-ID: | CA+TgmoaodCSSpS06yOx9djNEBvP7voSYd9KPOpmjQjM5OF_EvA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 28, 2015 at 5:50 PM, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
> 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.)
I've written an aggregate that does something like this a few times.
I think one time I called it "the", which is probably too clever, but
then you could query for the(project_manager) and similar. I've
usually written it to not error-check and just return the first
non-NULL value it runs across, which suggests a name like any_old() or
whatever().
I actually think by comparison with those ideas, onlyvalue() - or
maybe only_value() - is not bad.
> I'll add this to September's commit fest,
November, probably.
> but if you want to bash me or the
> patch in the meanwhile, go ahead.
What if we want to say nice things?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-10-30 09:47:23 | Re: September 2015 Commitfest |
Previous Message | Bruce Momjian | 2015-10-30 09:03:13 | Re: Patent warning about the Greenplum source code |