On Wed, Oct 28, 2015 at 5:50 PM, Marko Tiikkaja <ma...@joh.to> wrote: > Here's a patch for the aggregate function outlined by Corey Huinker in > CADkLM=foA_oC_Ri23F9PbfLnfwXFbC3Lt8bBzRu3=cb77g9...@mail.gmail.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers