interval: round values when spilling to months
authorBruce Momjian <bruce@momjian.us>
Tue, 3 Aug 2021 16:10:29 +0000 (12:10 -0400)
committerBruce Momjian <bruce@momjian.us>
Tue, 3 Aug 2021 16:10:29 +0000 (12:10 -0400)
commit95ab1e0a9db321dd796344d526457016eada027f
tree46060b6a57cc20b4537b0c84b3d08c959130597e
parente462856a7a559c94bad51507c6b324f337d8254b
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
doc/src/sgml/datatype.sgml
src/backend/utils/adt/datetime.c
src/interfaces/ecpg/pgtypeslib/interval.c