SyntaxFix
Write A Post
Hire A Developer
Questions
Since 9.0 this is even easier:
SELECT id, string_agg(some_column, ',') FROM the_table GROUP BY id