From: Bruce Momjian Date: Thu, 22 Nov 2007 17:51:39 +0000 (+0000) Subject: Add more comments about thousands separator handling. X-Git-Tag: REL8_3_BETA4~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b85cf684f76f7535407669438b406dd61542e8f0;p=postgresql Add more comments about thousands separator handling. --- diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 29f8fc7155..e7bcef8adc 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------- * formatting.c * - * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.135 2007/11/22 15:10:05 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.136 2007/11/22 17:51:39 momjian Exp $ * * * Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group @@ -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 2dee6be79d..d0e378b7bd 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.93 2007/11/22 15:10:05 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.94 2007/11/22 17:51:39 momjian Exp $ * * Note: we include postgres.h not postgres_fe.h so that we can include * catalog/pg_type.h, and thereby have access to INT4OID and similar macros. @@ -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. */