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

Commitd9bc7a3

Browse files
committed
Add comments about thousands separator logic.
1 parent73f9089 commitd9bc7a3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.134 2007/11/21 22:28:18 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.135 2007/11/22 15:10:05 momjian Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
@@ -3925,10 +3925,11 @@ NUM_prepare_locale(NUMProc *Np)
39253925
* Number thousands separator
39263926
*
39273927
* Some locales (e.g. broken glibc pt_BR), have a comma for decimal,
3928-
* but "" for thousands_sep, so we set the thousands_sep too. 2007-02-12
3928+
* but "" for thousands_sep, so we set the thousands_sep too.
39293929
*/
39303930
if (lconv->thousands_sep&&*lconv->thousands_sep)
39313931
Np->L_thousands_sep=lconv->thousands_sep;
3932+
/* Make sure thousands separator doesn't match decimal point symbol. */
39323933
elseif (strcmp(Np->decimal,",")!=0)
39333934
Np->L_thousands_sep=",";
39343935
else

‎src/bin/psql/print.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.92 2007/11/21 22:28:18 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.93 2007/11/22 15:10:05 momjian Exp $
77
*
88
* Note: we include postgres.h not postgres_fe.h so that we can include
99
* catalog/pg_type.h, and thereby have access to INT4OID and similar macros.
@@ -2039,6 +2039,7 @@ setDecimalLocale(void)
20392039
grouping="3";/* most common */
20402040
if (*extlconv->thousands_sep)
20412041
thousands_sep=strdup(extlconv->thousands_sep);
2042+
/* Make sure thousands separator doesn't match decimal point symbol. */
20422043
elseif (strcmp(decimal_point,",")!=0)
20432044
thousands_sep=",";
20442045
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp