Monthly Archives: June 2010

The Rule Challenge

I’ve made this challenge on IRC several times, and I think on the mailing lists too, but I’m putting it up here for reference. I’m not a fan of rules. I’ve used them in production code in the past, though … Continue reading

Posted in Peeves, PlanetPG, Postgres | 15 Comments

Range aggregation with window functions

This article is also available on the PG wiki here This problem is one I’ve been asked about a couple of times on IRC; the solution involves some tricks with window functions that have a fairly wide range of applications. … Continue reading

Posted in PlanetPG, Postgres, SQL | Comments Off on Range aggregation with window functions