How do you decide what aggregates to add?

From: Seamus Abshere <seamus(at)abshere(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: How do you decide what aggregates to add?
Date: 2017-10-20 14:11:14
Message-ID: 1508508674.1130504.1145432448.59069971@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

Who decides if a seemingly-useful aggregate is added to Postgres? I
would like to advocate for a couple, but I worry that I'm
misunderstanding some community process that has decided _not_ to add
aggregates or something.

1. I just discovered first()/last() as defined in the wiki [1], where
it's noted that conversion from Access or Oracle is much easier with
them.
2. We use our "homemade" jsonb_object_agg(jsonb) constantly, which is
modeled off of (built-in) json_object_agg(name, value) and (built-in)
jsonb_agg(expression). [2]

Since building these into Postgres (though not fast C versions) is a
matter of a dozen lines of SQL, why haven't they been added already?
Seems like a great thing to brag about in release notes, etc.

Thanks for your thoughts,
Seamus

[1] https://wiki.postgresql.org/wiki/First/last_(aggregate)
[2] http://blog.faraday.io/how-to-aggregate-jsonb-in-postgres/

--
Seamus Abshere, SCEA
https://www.faraday.io
https://github.com/seamusabshere
https://linkedin.com/in/seamusabshere

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-10-20 14:38:31 Re: How do you decide what aggregates to add?
Previous Message Önder Kalacı 2017-10-20 09:02:16 A question on pg_stat_subscription view