On Tue, 7 Jul 2009 01:59:35 +0430
Lee Harr <missive(at)hotmail(dot)com> wrote:
>
> Hi;
>
> I'm looking for a way to do this:
> # select idn, magic() as codes FROM tbl;
> idn | codes
> -----+------
> 1 | A
> 2 | B, C
> 3 | A, C, E
> (3 rows)
>
>
> Right now, I use plpgsql functions, but each time I do it
> I have to rewrite the function to customize it.
>
> Is there a generic way to do this? An aggregate maybe?
array_accum
http://www.postgresql.org/docs/8.2/static/xaggr.html
?
--
Ivan Sergio Borgonovo
http://www.webthatworks.it