On Mon, Jan 25, 2016 at 3:00 PM, Corey Huinker <corey.huin...@gmail.com> wrote: > This patch addresses a personal need: nearly every time I use > generate_series for timestamps, I end up casting the result into date or the > ISO string thereof. Like such: > > [...] > > One thing I discovered in doing this patch is that if you do a timestamp > generate_series involving infinity....it tries to do it. I didn't wait to > see if it finished.
Well, I would think that this is a bug that we had better address and backpatch. It does not make much sense to use infinity for timestamps, but letting it run infinitely is not good either. > For the date series, I put in checks to return an empty set: > > SELECT d.date_val FROM generate_series('-infinity'::date,'1999-12-29'::date) > as d(date_val); > date_val > ---------- > (0 rows) > > SELECT d.date_val FROM generate_series('1991-09-24'::date,'infinity'::date) > as d(date_val); > date_val > ---------- > (0 rows) Wouldn't a proper error be more adapted? -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers