"Morus Walter" <morus(dot)walter(dot)ml(at)googlemail(dot)com> writes:
> when trying to use the array_agg aggregate I ran into a `out of memory'
> issue.
This looks like a known issue, fixed here:
http://archives.postgresql.org/pgsql-committers/2009-07/msg00210.php
It will be in 8.4.1.
regards, tom lane