From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christoph Berg <myon(at)debian(dot)org> |
Cc: | David Fetter <david(at)fetter(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Torsten Zuehlsdorff <mailinglists(at)toco-domains(dot)de>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add generate_series(date,date) and generate_series(date,date,integer) |
Date: | 2016-02-21 21:52:27 |
Message-ID: | 16807.1456091547@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christoph Berg <myon(at)debian(dot)org> writes:
> Re: David Fetter 2016-01-26 <20160126180011(dot)GA16903(at)fetter(dot)org>
>> +1 for back-patching. There's literally no case where an infinite
>> input could be correct as the start or end of an interval for
>> generate_series.
> select * from generate_series(now(), 'infinity', '1 day') limit 10;
> ... seems pretty legit to me. If limit pushdown into SRFs happened to
> work some day, it'd be a pity if the above query raised an error.
Oooh ... actually, that works today if you consider the SRF-in-targetlist
case:
regression=# select generate_series(now(), 'infinity', '1 day') limit 10;
generate_series
-------------------------------
2016-02-21 16:51:03.303064-05
2016-02-22 16:51:03.303064-05
2016-02-23 16:51:03.303064-05
2016-02-24 16:51:03.303064-05
2016-02-25 16:51:03.303064-05
2016-02-26 16:51:03.303064-05
2016-02-27 16:51:03.303064-05
2016-02-28 16:51:03.303064-05
2016-02-29 16:51:03.303064-05
2016-03-01 16:51:03.303064-05
(10 rows)
Time: 8.457 ms
Given that counterexample, I think we not only shouldn't back-patch such a
change but should reject it altogether.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2016-02-21 22:03:45 | Re: checkpointer continuous flushing - V18 |
Previous Message | Fabien COELHO | 2016-02-21 21:49:35 | Re: checkpointer continuous flushing - V18 |