pgsql: Add overflow checks to money type input function - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Add overflow checks to money type input function
Date
Msg-id E1bkMP9-0007Hr-3g@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Tweak targetlist-SRF tests some more.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix and clarify comments on replacement selection.