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

Commitb85cf68

Browse files
committed
Add more comments about thousands separator handling.
1 parentf608f3b commitb85cf68

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
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.135 2007/11/2215:10:05 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.136 2007/11/2217:51:39 momjian Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
@@ -3926,6 +3926,7 @@ NUM_prepare_locale(NUMProc *Np)
39263926
*
39273927
* Some locales (e.g. broken glibc pt_BR), have a comma for decimal,
39283928
* but "" for thousands_sep, so we set the thousands_sep too.
3929+
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg00772.php
39293930
*/
39303931
if (lconv->thousands_sep&&*lconv->thousands_sep)
39313932
Np->L_thousands_sep=lconv->thousands_sep;

‎src/bin/psql/print.c

Lines changed: 3 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.93 2007/11/2215:10:05 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.94 2007/11/2217:51:39 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.
@@ -2037,6 +2037,8 @@ setDecimalLocale(void)
20372037
grouping=strdup(extlconv->grouping);
20382038
else
20392039
grouping="3";/* most common */
2040+
2041+
/* similar code exists in formatting.c */
20402042
if (*extlconv->thousands_sep)
20412043
thousands_sep=strdup(extlconv->thousands_sep);
20422044
/* Make sure thousands separator doesn't match decimal point symbol. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp