postgresql/src/backend
Nathan Bossart 3764ee47f7 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
..
access Ensure vacuum removes all visibly dead tuples older than OldestXmin 2024-07-19 12:12:03 -04:00
archive Fix memory leaks in error reporting with LOG level 2024-05-14 10:41:32 +02:00
backup Fix limit block handling in pg_wal_summary_contents(). 2024-07-09 09:29:11 +09:00
bootstrap Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
catalog Fix missing invalidations for search_path cache. 2024-07-09 11:27:10 -07:00
commands Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
executor Propagate query IDs of utility statements in functions 2024-07-19 10:21:21 +09:00
foreign Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
jit Move resowner from common JitContext to LLVM specific 2024-07-19 10:27:54 +03:00
lib Revert: Implement pg_wal_replay_wait() stored procedure 2024-04-11 17:28:15 +03:00
libpq A few follow-up fixes for GUC name quoting 2024-05-17 13:48:31 +02:00
main Tighten check for --forkchild argument when spawning child process 2024-07-03 16:20:56 +03:00
nodes Adapt REL_17_STABLE to its new status as a stable branch 2024-07-01 08:05:35 +09:00
optimizer Fix possible Assert failure in cost_memoize_rescan 2024-06-19 10:20:24 +12:00
parser SQL/JSON: Rethink c2d93c3802 2024-07-17 17:13:48 +09:00
partitioning Fix creation of partition descriptor during concurrent detach 2024-06-11 11:38:45 +02:00
po Translation updates 2024-06-24 13:11:27 +02:00
port Revise GUC names quoting in messages again 2024-05-17 11:44:26 +02:00
postmaster Do not summarize WAL if generated with wal_level=minimal. 2024-07-18 12:19:29 -04:00
regex Support C.UTF-8 locale in the new builtin collation provider. 2024-03-19 15:24:41 -07:00
replication Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
rewrite Fix assorted bugs related to identity column in partitioned tables 2024-05-07 22:50:00 +02:00
snowball Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
statistics Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
storage Fix lost Windows socket EOF events. 2024-07-13 15:02:33 +12:00
tcop Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
tsearch Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
utils Add overflow checks to money type. 2024-07-19 11:52:32 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Fix make build on MinGW 2024-06-21 08:17:23 +02:00
meson.build meson: Fix import library name in Windows 2024-06-20 09:08:36 +02:00
nls.mk Add missing gettext triggers 2024-05-14 12:57:22 +02:00