Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2cb6122

Browse files
committed
Support "" for thousands separator and plus sign in to_char(), per
report from French Debian user. psql already handles "" fine.
1 parent 05e27a9 commit 2cb6122

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/utils/adt/formatting.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.104 2006/02/12 04:44:15 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.105 2006/02/12 19:52:06 momjian Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2005, PostgreSQL Global Development Group
@@ -3720,15 +3720,16 @@ NUM_prepare_locale(NUMProc *Np)
37203720
else
37213721
Np->L_negative_sign = "-";
37223722

3723-
if (lconv->positive_sign && *lconv->positive_sign)
3723+
/* Might be "" */
3724+
if (lconv->positive_sign)
37243725
Np->L_positive_sign = lconv->positive_sign;
37253726
else
37263727
Np->L_positive_sign = "+";
37273728

37283729
/*
3729-
* Number thousands separator
3730+
* Number thousands separator (might be "")
37303731
*/
3731-
if (lconv->thousands_sep && *lconv->thousands_sep)
3732+
if (lconv->thousands_sep)
37323733
Np->L_thousands_sep = lconv->thousands_sep;
37333734
else
37343735
Np->L_thousands_sep = ",";

0 commit comments

Comments
 (0)