Re: [GENERAL] Recurring events

2011-06-08 Thread hubert depesz lubaczewski
On Mon, Jun 06, 2011 at 12:59:44PM +0200, Thomas Guettler wrote: > how do you store recurring events in a database? Check this: http://www.justatheory.com/computers/databases/postgresql/recurring_events.html Best regards, depesz -- The best thing about modern society is how easy it is to avoid

Re: [GENERAL] Recurring events

2011-06-07 Thread Troy Rasiah
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 weekl

Re: [GENERAL] Recurring events

2011-06-07 Thread Vincent Veyron
Le mardi 07 juin 2011 à 13:28 +0200, Thomas Guettler a écrit : > > 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

Re: [GENERAL] Recurring events

2011-06-07 Thread Thomas Guettler
Hi Craig and mailing list On 07.06.2011 00:54, Craig Ringer wrote: > On 06/06/2011 06:59 PM, Thomas Guettler wrote: >> Hi, >> >> how do you store recurring events in a database? > > I use two tables: one table that stores the recurring event, and another > that's essentially a materialized view c

Re: [GENERAL] Recurring events

2011-06-07 Thread Thomas Guettler
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 even

Re: [GENERAL] Recurring events

2011-06-07 Thread Vincent Veyron
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,

Re: [GENERAL] Recurring events

2011-06-06 Thread Craig Ringer
On 06/06/2011 06:59 PM, Thomas Guettler wrote: Hi, how do you store recurring events in a database? I use two tables: one table that stores the recurring event, and another that's essentially a materialized view containing instances of the event. It's not ideal, but performs better than usi

[GENERAL] Recurring events

2011-06-06 Thread Thomas Guettler
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 ca