From 141696fc2a1bf47ed1d6a9d53584ec932f9de221 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 22 Nov 2007 17:51:39 +0000 Subject: [PATCH] Add more comments about thousands separator handling. --- src/backend/utils/adt/formatting.c | 1 + src/bin/psql/print.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index a3f66ba93c..fc33e3ded7 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -3926,6 +3926,7 @@ NUM_prepare_locale(NUMProc *Np) * * Some locales (e.g. broken glibc pt_BR), have a comma for decimal, * but "" for thousands_sep, so we set the thousands_sep too. + * http://archives.postgresql.org/pgsql-hackers/2007-11/msg00772.php */ if (lconv->thousands_sep && *lconv->thousands_sep) Np->L_thousands_sep = lconv->thousands_sep; diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 997ac56e03..dec427179b 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -2037,6 +2037,8 @@ setDecimalLocale(void) grouping = strdup(extlconv->grouping); else grouping = "3"; /* most common */ + + /* similar code exists in formatting.c */ if (*extlconv->thousands_sep) thousands_sep = strdup(extlconv->thousands_sep); /* Make sure thousands separator doesn't match decimal point symbol. */ -- 2.39.5