Re: generate_series() Interpretation

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: generate_series() Interpretation
Дата
Msg-id BA3B2597-4F1C-4720-B252-BB39AFD76FA9@kineticode.com
обсуждение исходный текст
Ответ на Re: generate_series() Interpretation  (Steve Crawford <scrawford@pinpointresearch.com>)
Ответы Re: generate_series() Interpretation  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-hackers
On Jun 27, 2011, at 10:54 AM, Steve Crawford wrote:

> That's just how intervals that represent varying periods of time work. You would need to write your own. But a series
ofend-of-month dates is pretty easy: 
> select generate_series('2011-06-01'::timestamp , '2012-04-01'::timestamp, '1 month') - '1 day'::interval;

Yeah, but it's trickier if you have a calendaring app and don't know that date a user has chosen for a monthly
recurringevent. They might have selected June 30, in which case only February would ever need to be different than the
default.

Best,

David



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: generate_series() Interpretation
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade defaulting to port 25432