Add more comments about thousands separator handling.
authorBruce Momjian <bruce@momjian.us>
Thu, 22 Nov 2007 17:51:39 +0000 (17:51 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 22 Nov 2007 17:51:39 +0000 (17:51 +0000)
src/backend/utils/adt/formatting.c
src/bin/psql/print.c

index a3f66ba93c6f73cdce97225f71e85a2d24add14d..fc33e3ded7820901b2c8ea7f90152e31f23088fe 100644 (file)
@@ -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;
index 997ac56e03cfdc1acac777eb89cdc81d9faa0211..dec427179bacb00af9e4e097ac434c2b06c4a661 100644 (file)
@@ -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. */