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

Commit1783e5d

Browse files
committed
Fix money type's send/receive functions to conform to recent widening
of the datatype to int64. Per Andrew Chernow.
1 parent1cee06a commit1783e5d

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
StringInfobuf= (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
StringInfoDatabuf;
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)

[8]ページ先頭

©2009-2025 Movatter.jp