Seamus Abshere <seamus@abshere.net> writes:
> Who decides if a seemingly-useful aggregate is added to Postgres?
There's no particularly well-defined process for it, but as far as
these items ago:
> 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.
Those are (a) undefined as to precise behavior, (b) redundant with
the first_value/last_value window functions, which *are* well defined
(not to mention SQL-standard), and (c) easy enough to make in SQL if
you want them despite (a) and (b). So I don't really see them
getting over the hump.
> 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]
I dunno, the semantics of using jsonb_concat as an aggregate transfn
seem pretty squishy to me. It's certainly much less well-defined
as to what you get than for either of the existing aggs you mention.
The short answer really is that we spend a lot of sweat on making Postgres
extensible so that we don't have to put in (and then maintain forever)
every little special-purpose function somebody might want.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general