Add overflow checks to money type input function
The money type input function did not have any overflow checks at all.
There were some regression tests that purported to check for overflow,
but they actually checked for the overflow behavior of the int8 type
before casting to money. Remove those unnecessary checks and add some
that actually check the money input function.
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/656df624c0d7b50e1714f2a3a14e143e63799a80
Modified Files
--------------
src/backend/utils/adt/cash.c | 53 ++++++++++++++++++--
src/test/regress/expected/money.out | 98 ++++++++++++++++++++++++++++++++++---
src/test/regress/sql/money.sql | 30 ++++++++++--
3 files changed, 165 insertions(+), 16 deletions(-)
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.