Let's imagine simple situation - you have table of objects (each with id), and you want objects 3, 71, 5 and 16. And in that order! How to do it?

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.