Thread: pgsql: interval: round values when spilling to months

pgsql: interval: round values when spilling to months

From
Bruce Momjian
Date:
interval:  round values when spilling to months

Previously spilled units greater than months were truncated to months.
Also document the spill behavior.

Reported-by: Bryn Llewelly

Discussion: https://postgr.es/m/BDAE4B56-3337-45A2-AC8A-30593849D6C0@yugabyte.com

Backpatch-through: master

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/95ab1e0a9db321dd796344d526457016eada027f

Modified Files
--------------
doc/src/sgml/datatype.sgml                | 25 ++++++++++++++-----------
src/backend/utils/adt/datetime.c          | 16 ++++++----------
src/interfaces/ecpg/pgtypeslib/interval.c | 16 ++++++----------
3 files changed, 26 insertions(+), 31 deletions(-)