projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fced29
)
Fix cash_mul_int4 and cash_div_int4 for overenthusiastic substitution
author
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 21 Aug 2007 03:56:07 +0000
(
03:56
+0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 21 Aug 2007 03:56:07 +0000
(
03:56
+0000)
of int64 for int32. Per reports from Merlin Moncure and Andrew Chernow.
src/backend/utils/adt/cash.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/cash.c
b/src/backend/utils/adt/cash.c
index 635b39b8246c53abd8d8d3dbfa87701abd0e95d4..ec90d489fe20f6d97bcfc10569cace755fd88f01 100644
(file)
--- a/
src/backend/utils/adt/cash.c
+++ b/
src/backend/utils/adt/cash.c
@@
-652,7
+652,7
@@
Datum
cash_mul_int4(PG_FUNCTION_ARGS)
{
Cash c = PG_GETARG_CASH(0);
- int
64 i = PG_GETARG_INT64
(1);
+ int
32 i = PG_GETARG_INT32
(1);
Cash result;
result = c * i;
@@
-683,7
+683,7
@@
Datum
cash_div_int4(PG_FUNCTION_ARGS)
{
Cash c = PG_GETARG_CASH(0);
- int
64 i = PG_GETARG_INT64
(1);
+ int
32 i = PG_GETARG_INT32
(1);
Cash result;
if (i == 0)