index 37e1ccd9a9c1f35bc88b2a1a440452d5e1f7db6d..74e2db6082d7e9543338650576505a469ec8beea 100644 (file)
/* -----------------------------------------------------------------------
* formatting.c
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.122 2007年02月09日 04:17:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.123 2007年02月13日 02:00:55 momjian Exp $
*
*
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
else
Np->L_positive_sign = "+";
- /*
- * Number thousands separator
- */
- if (lconv->thousands_sep && *lconv->thousands_sep)
- Np->L_thousands_sep = lconv->thousands_sep;
- else
- Np->L_thousands_sep = ",";
-
/*
* Number decimal point
*/
else
Np->decimal = ".";
+ if (!IS_LDECIMAL(Np->Num))
+ Np->decimal = ".";
+
+ /*
+ * Number thousands separator
+ *
+ * Some locales (e.g. broken glibc pt_BR), have a comma for
+ * decimal, but "" for thousands_sep, so we might make the
+ * thousands_sep comma too. 2007年02月12日
+ */
+ if (lconv->thousands_sep && *lconv->thousands_sep)
+ Np->L_thousands_sep = lconv->thousands_sep;
+ else
+ Np->L_thousands_sep = ",";
+
/*
* Currency symbol
*/
Np->L_currency_symbol = lconv->currency_symbol;
else
Np->L_currency_symbol = " ";
-
- if (!IS_LDECIMAL(Np->Num))
- Np->decimal = ".";
}
else
{