From fc0d9b8c224ff6b84113cefdca1ba9dde879d863 Mon Sep 17 00:00:00 2001 From: John Naylor Date: Wed, 28 Jul 2021 11:22:58 -0400 Subject: 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 --- doc/src/sgml/func.sgml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 741dfbae4a5..c12d03e5832 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10008,12 +10008,8 @@ SELECT date_bin('15 minutes', TIMESTAMP '2020-02-11 15:44:17', TIMESTAMP '2001-0 - Negative intervals are allowed and are treated the same as positive intervals. - - - - The stride interval cannot contain units of month - or larger. + The stride interval must be greater than zero and + cannot contain units of month or larger. -- cgit v1.2.3