Gregory Stark <stark@enterprisedb.com> writes:
> The solution to this would analogous to what we did to count(). We would need
> to add a field to ArrayMetaState which is stored in fn_extra to remember the
> last array returned. Then if array_push notices it has been called from an
> aggregate context it can store its result in there. The next time it would
> extend that array in place (which is code which doesn't currently exist),
contrib/intagg
regards, tom lane