News for hackers. Stuff that matters.
Re:Arrays in Postgres by joevandyk on Wednesday August 22, 2012 @12:33AM (#4416052)
While I probably wouldn't store things in an array, it's useful to get data back out in array format sometimes.

    select array_agg(email_address), home_state from users group by home_state
Will give you a list of home states and all the email addresses that belong to that state.
Re:Arrays in Postgres by radiowave on Wednesday August 22, 2012 @03:07AM (#4416357)
Right. A case I've used them for is a recursive query which returns a set of rows, where each row is some end-point that matches the query criteria, the rows can include arrays representing the list of nodes traversed to reach that end-point, or some notion of the path cost by hop.