Finally, we got very important addons to PostgreSQL, which help with dealing with arrays. It solves a lot of problems, which were usually solved with standard cookbook code, which was in faqs, blog posts and number of examples on irc.

Cezio wrote post about removing elements from arrays in PostgreSQL. Unfortunately his blog engine requires registration before comment, which I don't like, so I decided to comment using my own blogspace.

Yesterday, Alvaro Herrera committed patch written by Pavel Stehule which adds generate_subscripts(...) function.