Re: Add generate_series(date,date) and generate_series(date,date,integer)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Add generate_series(date,date) and generate_series(date,date,integer)
Дата
Msg-id 20160126182626.GA570111@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Add generate_series(date,date) and generate_series(date,date,integer)  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs wrote:
> On 25 January 2016 at 09:55, Tomas Vondra <tomas.vondra@2ndquadrant.com>
> wrote:
> 
> 
> > Imagine for example a script that in some rare cases passes happens to
> > pass infinity into generate_series() - in that case I'd much rather error
> > out than wait till the end of the universe.
> >
> > So +1 from me to checking for infinity.
> 
> +1
> 
> ERROR infinite result sets are not supported, yet

In the future we may get lazy evaluation of functions.  When and if that
happens we may want to remove this limitation so that you can get a
streaming result producing timestamp values continuously.

(I don't necessarily think you'd use generate_series in such cases.
Maybe you'd want clock_timestamp to generate the present value at each
call, for example.  But there may be uses for synthetic values as well.)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Speedup twophase transactions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch: ResourceOwner optimization for tables with many partitions