Re: generate_series() Interpretation - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: generate_series() Interpretation
Date
Msg-id AA76EC8B-7880-466F-A614-8A6DF4060E29@kineticode.com
Whole thread Raw
In response to Re: generate_series() Interpretation  (Steve Crawford <scrawford@pinpointresearch.com>)
Responses Re: generate_series() Interpretation
Re: generate_series() Interpretation
List pgsql-hackers
On Jun 27, 2011, at 11:36 AM, Steve Crawford wrote:

> The query is marginally trickier. But the better calendaring apps give a variety of options when selecting "repeat":
Auser who selects June 30, 2011 and wants a monthly repeat might want: 
>
> 30th of every month - skip months without a 30th
> 30th of every month - move to end-of-month if 30th doesn't exist
> Last day of every month
> Last Thursday of every month
>
> Typical payday repeats are "the 15th and last -day-of-month if a workday or the closest preceding workday if not",
"secondand last Friday", "every other Friday"... 
>
> No matter how '1 month' is interpreted in generate_series, the application programmer will still need to write the
queriesrequired to handle whatever calendar-repeat features are deemed necessary. 

Yeah, which is why I said it was subject to interpretation. Of course there's no way to tell generate_series() which to
use,which is what I figured. 

Thanks,

David




pgsql-hackers by date:

Previous
From: Steve Crawford
Date:
Subject: Re: generate_series() Interpretation
Next
From: Robert Haas
Date:
Subject: Re: Range Types, constructors, and the type system