postgresql/src
Tom Lane 4019285c06 Detect more overflows in timestamp[tz]_pl_interval.
In commit 25cd2d640 I (tgl) opined that "The additions of the months
and microseconds fields could also overflow, of course.  However,
I believe we need no additional checks there; the existing range
checks should catch such cases".  This is demonstrably wrong however
for the microseconds field, and given that discovery it seems prudent
to be paranoid about the months addition as well.

Report and patch by Joseph Koshakow.  As before, back-patch to all
supported branches.  (However, the test case doesn't work before
v15 because we didn't allow wider-than-int32 numbers in interval
literals.  A variant test could probably be built that fits within
that restriction, but it didn't seem worth the trouble.)

Discussion: https://postgr.es/m/CAAvxfHf77sRHKoEzUw9_cMYSpbpNS2C+J_+8Dq4+0oi8iKopeA@mail.gmail.com
2024-04-28 13:42:13 -04:00
..
backend Detect more overflows in timestamp[tz]_pl_interval. 2024-04-28 13:42:13 -04:00
bin Minor fixes to pg_combinebackup and its documentation. 2024-04-26 08:42:42 -04:00
common Remove redundant JSON parser typedefs 2024-04-27 07:02:57 -04:00
fe_utils Allow dbname to be written as part of connstring via pg_basebackup's -R option. 2024-03-21 10:50:33 +05:30
include Small cosmetic fixes in radix tree template 2024-04-27 14:42:01 +07:00
interfaces Remove obsolete symbol from ecpg_config.h.in 2024-04-24 08:27:25 +02:00
makefiles Optimize pg_popcount() with AVX-512 instructions. 2024-04-06 21:56:23 -05:00
pl Fix plpgsql's handling of -- comments following expressions. 2024-04-10 15:45:58 -04:00
port Fix code for probing availability of AVX-512. 2024-04-23 10:54:04 -05:00
template Remove AIX support 2024-02-28 15:17:23 +04:00
test Detect more overflows in timestamp[tz]_pl_interval. 2024-04-28 13:42:13 -04:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Remove redundant JSON parser typedefs 2024-04-27 07:02:57 -04:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Update Unicode data to CLDR 45 2024-04-22 09:16:33 +02:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00