* this version handles 64 bit numbers and so can hold values up to
  * $92,233,720,368,547,758.07.
  *
- * $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.71 2007/07/12 23:51:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.72 2007/08/21 03:14:36 tgl Exp $
  */
 
 #include "postgres.h"
 {
    StringInfo  buf = (StringInfo) PG_GETARG_POINTER(0);
 
-   PG_RETURN_CASH((Cash) pq_getmsgint(buf, sizeof(Cash)));
+   PG_RETURN_CASH((Cash) pq_getmsgint64(buf));
 }
 
 /*
    StringInfoData buf;
 
    pq_begintypsend(&buf);
-   pq_sendint(&buf, arg1, sizeof(Cash));
+   pq_sendint64(&buf, arg1);
    PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
 }