postgres.git / summary / log / commit / refs

commit    fbc11b9dcf7be2c75e0485e33df8f096c29ea2fe
Author:   Bruce Momjian <bruce@momjian.us>
Date:     Thu Jul 14 15:54:21 2005 +0000
First released in: 8.1.0

    Make better thousands_sep default based on decimal marker value.


src/bin/psql/print.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 27e081870ac..457b1d1aee3 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -3,7 +3,7 @@ * * 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 "common.h" @@ -1722,8 +1722,10 @@ setDecimalLocale(void) grouping = "3"; /* most common */ if (*extlconv->thousands_sep) thousands_sep = strdup(extlconv->thousands_sep); + else if (*decimal_point != ',') + thousands_sep = ","; else - thousands_sep = ","; /* matches SQL standard decimal marker */ + thousands_sep = "."; } [parent: 45a19efa9ec6]