pgsql: Disallow infinite endpoints in generate_series() for timestamps.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Disallow infinite endpoints in generate_series() for timestamps.
Дата
Msg-id E1nhIV2-000KSn-V2@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Disallow infinite endpoints in generate_series() for timestamps.

Such cases will lead to infinite loops, so they're of no practical
value.  The numeric variant of generate_series() already threw error
for this, so borrow its message wording.

Per report from Richard Wesley.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/91B44E7B-68D5-448F-95C8-B4B3B0F5DEAF@duckdblabs.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e346329470081f5919e83b1acb2d0f2442c1fc3d

Modified Files
--------------
src/backend/utils/adt/timestamp.c         | 28 ++++++++++++++++++
src/test/regress/expected/timestamp.out   | 49 +++++++++++++++++++++++++++++++
src/test/regress/expected/timestamptz.out | 49 +++++++++++++++++++++++++++++++
src/test/regress/sql/timestamp.sql        | 15 ++++++++++
src/test/regress/sql/timestamptz.sql      | 15 ++++++++++
5 files changed, 156 insertions(+)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Allow db.schema.table patterns, but complain about random garbag
Следующее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Fix CLUSTER tuplesorts on abbreviated expressions.