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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy