Hacker Newsnew | comments | show | ask | jobs | submit login

I rarely use postgres arrays as an actual storage type, but have used them frequently in results (there are aggregation functions to turn multiple rows into an array). The common use is something like pulling a user's info and roles in a single query with the roles from the many to many relationship aggregated to an array, so the result is one row per user and only requires one trip to the db.. The other common use is similar to above, but for handing off to a stored procedure of some sort. I haven't found a use for it as a stored column type, however.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: