CREATE AGGREGATE aggarray (BASETYPE = ANYELEMENT, SFUNC = aggregate_array, STYPE = ANYARRAY);
Or, from the docs, see: http://www.postgresql.org/docs/current/static/xaggr.html
CREATE AGGREGATE array_accum ( sfunc = array_append, basetype = anyelement, stype = anyarray, initcond = '{}' );
array_append() is built-in in 7.4 -- and note both Pavel's solution and this one require 7.4.x
HTH,
Joe
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly