Christoph Haller <[EMAIL PROTECTED]> writes:

> Interesting feature, but I cannot find function array_append: 
> ERROR:  AggregateCreate: function array_append(integer[], integer) does not exist

It's new in Postgres 7.4

I think you could do this in 7.3 though, it would just be more awkward. Try ||
but I think that's new in 7.4 as well. Otherwise I think you would have to
pick out the upper bound of the array with array_dims and set the upper+1'th
element of the array.

If you're doing text you may want to go directly to a textual concatenation
like:

CREATE FUNCTION concat_agg_accum(text, text) RETURNS text
    AS 'select $1 || '', '' || $2'
    LANGUAGE sql IMMUTABLE STRICT;

CREATE AGGREGATE concat_agg (
    BASETYPE = text,
    SFUNC = concat_agg_accum,
    STYPE = text
);


-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to