Re: pg_generate_sequence and info_schema patch (Was: SELECT

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: pg_generate_sequence and info_schema patch (Was: SELECT
Дата
Msg-id 402178B5.9050008@joeconway.com
обсуждение исходный текст
Ответ на Re: pg_generate_sequence and info_schema patch (Was: SELECT  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-patches
Christopher Kings-Lynne wrote:
> Having something that generates a list of dates would be handy, however
> I guess you can do it with the current series generator by adding that
> many day intervals to a base date...

Seems to work:

regression=# select current_date + s.a as dates from
generate_series(1,3) as s(a);
    dates
------------
  2004-02-05
  2004-02-06
  2004-02-07
(3 rows)

Or even:

regression=# select current_date + s.a * '1 week'::interval as dates
from generate_series(1,3) as s(a);
         dates
---------------------
  2004-02-11 00:00:00
  2004-02-18 00:00:00
  2004-02-25 00:00:00
(3 rows)

Joe



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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: temp patch for win32 readdir issue
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: temp patch for win32 readdir issue