Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14572e4

Browse files
committed
Fix cash_mul_int4 and cash_div_int4 for overenthusiastic substitution
of int64 for int32. Per reports from Merlin Moncure and Andrew Chernow.
1 parent1783e5d commit14572e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/utils/adt/cash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* this version handles 64 bit numbers and so can hold values up to
1414
* $92,233,720,368,547,758.07.
1515
*
16-
* $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.72 2007/08/21 03:14:36 tgl Exp $
16+
* $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.73 2007/08/21 03:56:07 tgl Exp $
1717
*/
1818

1919
#include"postgres.h"
@@ -652,7 +652,7 @@ Datum
652652
cash_mul_int4(PG_FUNCTION_ARGS)
653653
{
654654
Cashc=PG_GETARG_CASH(0);
655-
int64i=PG_GETARG_INT64(1);
655+
int32i=PG_GETARG_INT32(1);
656656
Cashresult;
657657

658658
result=c*i;
@@ -683,7 +683,7 @@ Datum
683683
cash_div_int4(PG_FUNCTION_ARGS)
684684
{
685685
Cashc=PG_GETARG_CASH(0);
686-
int64i=PG_GETARG_INT64(1);
686+
int32i=PG_GETARG_INT32(1);
687687
Cashresult;
688688

689689
if (i==0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp