"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> what about
> CREATE AGGREGATE array_accum (
> sfunc = array_append,
> basetype = anyelement,
> stype = anyarray,
> initcond = '{}'
> );
huh, that is faster. It's only 14x slower than the C implementation.
For completeness, here are the fastest times I get after repeating a few times
each:
13.97 ms contrib/intagg C implementation
194.76 ms aggregate using array_append
723.15 ms aggregate with SQL state function
--
greg