pgsql: Disallow negative strides in date_bin() - Mailing list pgsql-committers

From John Naylor
Subject pgsql: Disallow negative strides in date_bin()
Date
Msg-id E1m8mAw-0005Wu-Ok@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL_14_STABLE

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

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(-)


pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Use the AddFile function consistently in MSVC build scripts
Next
From: Fujii Masao
Date:
Subject: pgsql: Update minimum recovery point on truncation during WAL replay of