aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-07-14 08:42:37 +0000
committerBruce Momjian <bruce@momjian.us>2005-07-14 08:42:37 +0000
commit45a19efa9ec66fa35cc86671e2a1cebfe787fd9f (patch)
treecf8cb150000919cb8da1330ea8cbc7a21c68bbbb /src/bin/psql/command.c
parent4a8bbbd2ee0518b98b1aef74e88ad73baf9ea574 (diff)
downloadpostgresql-45a19efa9ec66fa35cc86671e2a1cebfe787fd9f.tar.gz
postgresql-45a19efa9ec66fa35cc86671e2a1cebfe787fd9f.zip
Change numericsep to a boolean, and make it locale-aware.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 888fa4f55a6..0c4db123db5 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.148 2005/07/14 06:49:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.149 2005/07/14 08:42:37 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -1420,15 +1420,17 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
: _("Expanded display is off.\n"));
}
+ /* numeric separators */
else if (strcmp(param, "numericsep") == 0)
{
- if (value)
+ popt->topt.numericSep = !popt->topt.numericSep;
+ if (!quiet)
{
- free(popt->topt.numericSep);
- popt->topt.numericSep = pg_strdup(value);
+ if (popt->topt.numericSep)
+ puts(_("Showing numeric separators."));
+ else
+ puts(_("Numeric separators are off."));
}
- if (!quiet)
- printf(_("Numeric separator is \"%s\".\n"), popt->topt.numericSep);
}
/* null display */