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

Commitd938b75

Browse files
committed
From: "D'Arcy J.M. Cain" <darcy@druid.net>
Subject: [HACKERS] Inputting moneyI notice that I have to put single quotes around money amounts if thereis a decimal point in the value. I appears to be happening because thereis something changing things like "123.45" to "123.450000" and the codehas a problem with that. There may be a better way to fix this but hereis a simple change to cash.c that lets it accept trailing zeroes.
1 parent36712e8 commitd938b75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* workings can be found in the book "Software Solutions in C" by
1010
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
1111
*
12-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.6 1997/04/24 20:30:41 scrappy Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.7 1997/04/28 16:15:13 scrappy Exp $
1313
*/
1414

1515
#include<stdio.h>
@@ -125,7 +125,7 @@ cash_in(const char *str)
125125
}
126126
}
127127

128-
while (isspace(*s)||*s==')')s++;
128+
while (isspace(*s)||*s=='0'||*s==')')s++;
129129

130130
if (*s!='\0')
131131
elog(WARN,"Bad money external representation %s",str);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp