Re: Recurring events - Mailing list pgsql-general

From Thomas Guettler
Subject Re: Recurring events
Date
Msg-id 4DEE0B50.50004@tbz-pariv.de
Whole thread Raw
In response to Re: Recurring events  (Vincent Veyron <vv.lists@wanadoo.fr>)
Responses Re: Recurring events  (Vincent Veyron <vv.lists@wanadoo.fr>)
List 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

pgsql-general by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: windows vista and windows 7
Next
From: Vibhor Kumar
Date:
Subject: Re: maximum size limit for a query string?