RRULE parsing in Postgresql
The goal: to generate a list of timestamps, each representing an event occurrance, from an RRULE string (i.e. FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH ) and a starting timestamp. Since these times will be changed at the whim of a user, postgresql is desired for (1) it's quality of strict business logic and (2) triggers (auto-update rows when a value changes) Alternative Solution: I ended up using plpythonu (python language for postgresql). The dateutil library has a great rrule parser. mydatabase=# CREATE FUNCTION parse_occurrences(rule text, start timestamp) RETURNS timestamp[] AS