mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -10008,12 +10008,8 @@ SELECT date_bin('15 minutes', TIMESTAMP '2020-02-11 15:44:17', TIMESTAMP '2001-0
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Negative intervals are allowed and are treated the same as positive intervals.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <parameter>stride</parameter> interval cannot contain units of month
|
||||
or larger.
|
||||
The <parameter>stride</parameter> interval must be greater than zero and
|
||||
cannot contain units of month or larger.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
|
Reference in New Issue
Block a user