]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Revert "Disallow infinite endpoints in generate_series() for timestamps."
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 May 2022 15:02:37 +0000 (11:02 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 May 2022 15:40:41 +0000 (11:40 -0400)
commit7f0754bc4c0a0abadcbe02e886e31305c37a7053
tree99f91c7f3d5d3b94b92442e925075d8c8c6e358a
parent88743d581e1bdedc13e4ca33c5a6597a5d2dbdc4
Revert "Disallow infinite endpoints in generate_series() for timestamps."

This reverts commit eafdf9de06e9b60168f5e47cedcfceecdc6d4b5f
and its back-branch counterparts.  Corey Huinker pointed out that
we'd discussed this exact change back in 2016 and rejected it,
on the grounds that there's at least one usage pattern with LIMIT
where an infinite endpoint can usefully be used.  Perhaps that
argument needs to be re-litigated, but there's no time left before
our back-branch releases.  To keep our options open, restore the
status quo ante; if we do end up deciding to change things, waiting
one more quarter won't hurt anything.

Rather than just doing a straight revert, I added a new test case
demonstrating the usage with LIMIT.  That'll at least remind us of
the issue if we forget again.

Discussion: https://postgr.es/m/3603504.1652068977@sss.pgh.pa.us
Discussion: https://postgr.es/m/CADkLM=dzw0Pvdqp5yWKxMd+VmNkAMhG=4ku7GnCZxebWnzmz3Q@mail.gmail.com
src/backend/utils/adt/timestamp.c
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamptz.out
src/test/regress/sql/timestamp.sql
src/test/regress/sql/timestamptz.sql