Skip to content

Commit fbc11b9

Browse files
committed
Make better thousands_sep default based on decimal marker value.
1 parent 45a19ef commit fbc11b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bin/psql/print.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.67 2005/07/14 08:42:37 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.68 2005/07/14 15:54:21 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "common.h"
@@ -1722,8 +1722,10 @@ setDecimalLocale(void)
17221722
grouping = "3"; /* most common */
17231723
if (*extlconv->thousands_sep)
17241724
thousands_sep = strdup(extlconv->thousands_sep);
1725+
else if (*decimal_point != ',')
1726+
thousands_sep = ",";
17251727
else
1726-
thousands_sep = ","; /* matches SQL standard decimal marker */
1728+
thousands_sep = ".";
17271729
}
17281730

17291731

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