1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-01 01:04:50 +03:00

Make better thousands_sep default based on decimal marker value.

This commit is contained in:
Bruce Momjian 2005-07-14 15:54:21 +00:00
parent 45a19efa9e
commit fbc11b9dcf

View File

@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2005, PostgreSQL Global Development Group * Copyright (c) 2000-2005, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.67 2005/07/14 08:42:37 momjian Exp $ * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.68 2005/07/14 15:54:21 momjian Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "common.h" #include "common.h"
@ -1722,8 +1722,10 @@ setDecimalLocale(void)
grouping = "3"; /* most common */ grouping = "3"; /* most common */
if (*extlconv->thousands_sep) if (*extlconv->thousands_sep)
thousands_sep = strdup(extlconv->thousands_sep); thousands_sep = strdup(extlconv->thousands_sep);
else if (*decimal_point != ',')
thousands_sep = ",";
else else
thousands_sep = ","; /* matches SQL standard decimal marker */ thousands_sep = ".";
} }