How to request replay rules in PostgreSQL?

I have a repeat table that stores the iCalendar RFC 5545 repeat rule line. Example:

FREQ=MONTHLY;INTERVAL=2

Does anyone know any postgres features similar to the following:

get_events_between(date,date)

Where it will just query the repeat table and parse the rrule string.

+7
source share
1 answer

Starting with version 11, PostgreSQL lacks built-in support for the RFC-5545 repeat rule format.

But there is its own extension pg_rrule . When you install it, you can request an Ical schedule as follows:

SELECT *
FROM unnest(
    get_occurrences(
        'FREQ=MONTHLY;INTERVAL=2'::rrule,
        now(),
        now() + '6 months'::interval
    )
);

RRULE.

PS. , / . , , Google :-)

+1

All Articles