Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1783e5d

Browse files
committed
Fix money type's send/receive functions to conform to recent widening
of the datatype to int64. Per Andrew Chernow.
1 parent 1cee06a commit 1783e5d

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.71 2007/07/12 23:51:10 tgl Exp $
16+
* $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.72 2007/08/21 03:14:36 tgl Exp $
1717
*/
1818

1919
#include "postgres.h"
@@ -372,7 +372,7 @@ cash_recv(PG_FUNCTION_ARGS)
372372
{
373373
StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
374374

375-
PG_RETURN_CASH((Cash) pq_getmsgint(buf, sizeof(Cash)));
375+
PG_RETURN_CASH((Cash) pq_getmsgint64(buf));
376376
}
377377

378378
/*
@@ -385,7 +385,7 @@ cash_send(PG_FUNCTION_ARGS)
385385
StringInfoData buf;
386386

387387
pq_begintypsend(&buf);
388-
pq_sendint(&buf, arg1, sizeof(Cash));
388+
pq_sendint64(&buf, arg1);
389389
PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
390390
}
391391

0 commit comments

Comments
 (0)