Neil Conway <neilc(at)samurai(dot)com> writes:
> It seems we could add the necessary aggregate function to do this.
> Seems worth doing to me.
Please add it for both timestamp with/without time zone. AFAICS the
same underlying code will serve for both, but you'll need separate
entries in the system catalogs.
regards, tom lane