| От | Nathan Bossart |
|---|---|
| Тема | pgsql: Add overflow checks to money type. |
| Дата | |
| Msg-id | E1sUqtJ-000I0v-VC@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b82791c8fc2c6bc9d69f4362d7b7f46b9876fa46 Modified Files -------------- src/backend/utils/adt/cash.c | 174 +++++++++++++++++++----------------- src/test/regress/expected/money.out | 19 ++++ src/test/regress/sql/money.sql | 11 +++ 3 files changed, 124 insertions(+), 80 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера