Re: Recurring events

From: Thomas Guettler <hv(at)tbz-pariv(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Recurring events
Date: 2011-06-07 11:28:16
Message-ID: 4DEE0B50.50004@tbz-pariv.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07.06.2011 09:57, Vincent Veyron wrote:
> Le lundi 06 juin 2011 à 12:59 +0200, Thomas Guettler a écrit :
>
>> 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.
>>
>
> Maybe you could try something like what is used in cron, the scheduling
> program for GNU/Linux

I know cron very well. But I need to get all events on day X between time1 and time2 very quickly.
If I build a crontab like table, I need to check all entries before I can
know which crontab lines get executed during this period.

Thomas

--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vibhor Kumar 2011-06-07 11:48:35 Re: maximum size limit for a query string?
Previous Message andreas 2011-06-07 11:27:24 Re: maximum size limit for a query string?