Re: Add generate_series(date,date) and generate_series(date,date,integer) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Add generate_series(date,date) and generate_series(date,date,integer)
Date
Msg-id 20160126182626.GA570111@alvherre.pgsql
Whole thread Raw
In response to Re: Add generate_series(date,date) and generate_series(date,date,integer)  (Simon Riggs <simon@2ndQuadrant.com>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Speedup twophase transactions
Next
From: Tom Lane
Date:
Subject: Re: Patch: ResourceOwner optimization for tables with many partitions