Improve behavior of date_bin with origin in the future
Peter Eisentraut <peter@eisentraut.org>
Improve behavior of date_bin with origin in the future Currently, when the origin is after the input, the result is the timestamp at the end of the bin, rather than the beginning as expected. This puts the result consistently at the beginning of the bin. Author: John Naylor <john.naylor@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/CAFBsxsGjLDxQofRfH+d4KSAXxPf3MMevUG7s6EDfdBOvHLDLjw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/timestamp.c | modified | +14 −0 |
| src/test/regress/expected/timestamp.out | modified | +54 −0 |
| src/test/regress/sql/timestamp.sql | modified | +34 −0 |
Discussion
- truncating timestamps on arbitrary intervals 45 messages · 2020-02-26 → 2021-07-28