Re: [HACKERS] Issues with generate_series using integer boundaries

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: [HACKERS] Issues with generate_series using integer boundaries
Дата
Msg-id AANLkTinObbtKgvGoVT_Pcgf_2Mr4ZdO2dwPZjizBQTXP@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issues with generate_series using integer boundaries  (Thom Brown <thom@linux.com>)
Ответы Re: [HACKERS] Issues with generate_series using integer boundaries  (Thom Brown <thom@linux.com>)
Список pgsql-general
On Fri, Feb 4, 2011 at 21:32, Thom Brown <thom@linux.com> wrote:
> The issue is that generate_series will not return if the series hits
> either the upper or lower boundary during increment, or goes beyond
> it.  The attached patch fixes this behaviour, but should probably be
> done a better way.  The first 3 examples above will not return.

There are same bug in int8 and timestamp[tz] versions.
We also need fix for them.
=# SELECT x FROM generate_series(9223372036854775807::int8,
9223372036854775807::int8) AS a(x);
=# SELECT x FROM generate_series('infinity'::timestamp, 'infinity', '1
sec') AS a(x);
=# SELECT x FROM generate_series('infinity'::timestamptz, 'infinity',
'1 sec') AS a(x);

> postgres=# SELECT x FROM generate_series(1, 9,-1) AS a(x);
> postgres=# SELECT x FROM generate_series(1, 9,3) AS a(x);
They work as expected in 9.1dev.

--
Itagaki Takahiro

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

Предыдущее
От: Wouter D'Haeseleer
Дата:
Сообщение: Re: Question about switchover with PG9 replication
Следующее
От: Thom Brown
Дата:
Сообщение: Re: [HACKERS] Issues with generate_series using integer boundaries