Обсуждение: pgsql: Disallow negative strides in date_bin()

Поиск
Список
Период
Сортировка

pgsql: Disallow negative strides in date_bin()

От
John Naylor
Дата:
Disallow negative strides in date_bin()

It's not clear what the semantics of negative strides would be, so throw
an error instead.

Per report from Bauyrzhan Sakhariyev

Reviewed-by: Tom Lane, Michael Paquier
Discussion:
https://www.postgresql.org/message-id/CAKpL73vZmLuFVuwF26FJ%2BNk11PVHhAnQRoREFcA03x7znRoFvA%40mail.gmail.com
Backpatch to v14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3ba70d4e152372fd8ab90ed0887ee08d505ef306

Modified Files
--------------
doc/src/sgml/func.sgml                    | 8 ++------
src/backend/utils/adt/timestamp.c         | 8 ++++----
src/test/regress/expected/timestamp.out   | 5 ++++-
src/test/regress/expected/timestamptz.out | 5 ++++-
src/test/regress/sql/timestamp.sql        | 3 +++
src/test/regress/sql/timestamptz.sql      | 3 +++
6 files changed, 20 insertions(+), 12 deletions(-)