Skip to content

Commit b85cf68

Browse files
committed
Add more comments about thousands separator handling.
1 parent f608f3b commit b85cf68

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/22 15:10:05 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.136 2007/11/22 17: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/22 15:10:05 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.94 2007/11/22 17: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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy