mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
We store Cash/money as int of size 4, so make it an int rather than a long.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.21 1997/08/22 00:02:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.22 1997/08/22 07:12:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -196,7 +196,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
|
||||
case T_Integer:
|
||||
const_string = (char *) palloc(256);
|
||||
string_palloced = true;
|
||||
sprintf(const_string, "%ld", expr->val.ival);
|
||||
sprintf(const_string, "%d", expr->val.ival);
|
||||
break;
|
||||
default:
|
||||
elog(WARN,
|
||||
@ -242,7 +242,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
|
||||
case CASHOID: /* money */
|
||||
const_string = (char *) palloc(256);
|
||||
string_palloced = true;
|
||||
sprintf(const_string,"%ld",
|
||||
sprintf(const_string,"%d",
|
||||
(int) ((Const*)expr)->constvalue);
|
||||
break;
|
||||
|
||||
@ -360,7 +360,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen)
|
||||
case CASHOID: /* money */
|
||||
const_string = (char *) palloc(256);
|
||||
string_palloced = true;
|
||||
sprintf(const_string,"%ld",
|
||||
sprintf(const_string,"%d",
|
||||
(long) ((Const*)expr)->constvalue);
|
||||
break;
|
||||
case TEXTOID: /* text */
|
||||
|
Reference in New Issue
Block a user