

Using array_agg in Postgres – powerful and flexible - craigkerstiens
http://craigkerstiens.com/2013/04/17/array-agg/

======
pjungwir
Arrays are a really nice feature. As an aside, you can replace this line:

    
    
        array_to_string(array_agg(projects.name), ','))
    

with this:

    
    
        string_agg(projects.name, ',')

------
dcraw
Cool. MySQL and SQLite both have something similar called group_concat. Useful
for creating lists of ids to plug into another system.

