Re: Recurring events

From: Troy Rasiah <troyr(at)vicnet(dot)net(dot)au>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recurring events
Date: 2011-06-08 06:45:06
Message-ID: 4DEF1A72.9070401@vicnet.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/06/2011 8:59, Thomas Guettler wrote:
> Hi,
>
> how do you store recurring events in a database?
>
> Selecting all events in a week/month should be fast (comming from an index).
>
> My solution looks like this:
>
> Table event:
>
> Columns: id, name, recurring, start_datetime, end_datetime
>
> recurring is weekly, monthly, yearly or NULL.
>
> end_datetime can be NULL (open end).
>
> Can you create an indexed view with infinite rows? I only want to index
> the last three year and the next three years.
>
> An other solution would be to fill a table with "serialized" events. The recurring
> events would be created and inserted into a table. This can only be done in a time frame
> like above (last three year, next three years). If a recurring event gets altered,
> all its serialized events need to be updated.
>
> Any feedback?

I have had success using the instructions at

https://github.com/bakineggs/recurring_events_for

--
Troy Rasiah

In response to

Browse pgsql-general by date

  From Date Subject
Next Message eyal edri 2011-06-08 07:18:23 Best Practices - Securing an Enterprise application using JBOSS & Postgres
Previous Message Radosław Smogura 2011-06-08 05:30:33 Re: Postgres or Greenplum