Disallow negative strides in date_bin()
John Naylor <john.naylor@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +2 −6 |
| src/backend/utils/adt/timestamp.c | modified | +4 −4 |
| src/test/regress/expected/timestamp.out | modified | +4 −1 |
| src/test/regress/expected/timestamptz.out | modified | +4 −1 |
| src/test/regress/sql/timestamp.sql | modified | +3 −0 |
| src/test/regress/sql/timestamptz.sql | modified | +3 −0 |
Documentation touched
Discussion
- truncating timestamps on arbitrary intervals 45 messages · 2020-02-26 → 2021-07-28