Ray Aspeitia <aspeitia@sells.com> writes:
> I also would like to pass the delimiter to the aggregate as a parameter
> and I am not sure if it can handle that.
It can't. You'll need a single-argument finalfunc that hardwires the
delimiter, ie, array_to_string($1, '|')
regards, tom lane