mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Add comment that to_char() for broken glibc pt_BR might cause a problem.
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
* formatting.c
|
* 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
|
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
|
||||||
@ -3834,14 +3834,6 @@ NUM_prepare_locale(NUMProc *Np)
|
|||||||
else
|
else
|
||||||
Np->L_positive_sign = "+";
|
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
|
* Number decimal point
|
||||||
*/
|
*/
|
||||||
@ -3850,6 +3842,21 @@ NUM_prepare_locale(NUMProc *Np)
|
|||||||
else
|
else
|
||||||
Np->decimal = ".";
|
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
|
* Currency symbol
|
||||||
*/
|
*/
|
||||||
@ -3857,9 +3864,6 @@ NUM_prepare_locale(NUMProc *Np)
|
|||||||
Np->L_currency_symbol = lconv->currency_symbol;
|
Np->L_currency_symbol = lconv->currency_symbol;
|
||||||
else
|
else
|
||||||
Np->L_currency_symbol = " ";
|
Np->L_currency_symbol = " ";
|
||||||
|
|
||||||
if (!IS_LDECIMAL(Np->Num))
|
|
||||||
Np->decimal = ".";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user