postgresql/src
Nathan Bossart 22b0ccd65d Add overflow checks to money type.
None of the arithmetic functions for the the money type handle
overflow.  This commit introduces several helper functions with
overflow checking and makes use of them in the money type's
arithmetic functions.

Fixes bug #18240.

Reported-by: Alexander Lakhin
Author: Joseph Koshakow
Discussion: https://postgr.es/m/18240-c5da758d7dc1ecf0%40postgresql.org
Discussion: https://postgr.es/m/CAAvxfHdBPOyEGS7s%2Bxf4iaW0-cgiq25jpYdWBqQqvLtLe_t6tw%40mail.gmail.com
Backpatch-through: 12
2024-07-19 11:52:32 -05:00
..
backend Add overflow checks to money type. 2024-07-19 11:52:32 -05:00
bin Improve pg_ctl's message for shutdown after recovery. 2024-07-18 13:48:58 -04:00
common Typo fix 2024-07-08 22:12:55 +09:00
fe_utils Fix PL/pgSQL's handling of integer ranges containing underscores. 2024-06-04 11:48:01 +01:00
include Move resowner from common JitContext to LLVM specific 2024-07-19 10:27:06 +03:00
interfaces Fix outdated comment after removal of direct SSL fallback 2024-07-08 12:44:45 +03:00
makefiles Optimize pg_popcount() with AVX-512 instructions. 2024-04-06 21:56:23 -05:00
pl Improve PL/Tcl's method for choosing Tcl names of procedures. 2024-07-05 14:14:42 -04:00
port Pre-beta mechanical code beautification. 2024-05-14 16:34:50 -04:00
template Remove AIX support 2024-02-28 15:17:23 +04:00
test Add overflow checks to money type. 2024-07-19 11:52:32 -05:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Use atomics to avoid locking in InjectionPointRun() 2024-07-15 10:22:11 +03: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 Apply COPT to CXXFLAGS as well 2024-07-01 07:30:55 +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