1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Change numericsep to a boolean, and make it locale-aware.

This commit is contained in:
Bruce Momjian
2005-07-14 08:42:37 +00:00
parent 4a8bbbd2ee
commit 45a19efa9e
5 changed files with 94 additions and 77 deletions

View File

@ -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)
{
free(popt->topt.numericSep);
popt->topt.numericSep = pg_strdup(value);
}
popt->topt.numericSep = !popt->topt.numericSep;
if (!quiet)
printf(_("Numeric separator is \"%s\".\n"), popt->topt.numericSep);
{
if (popt->topt.numericSep)
puts(_("Showing numeric separators."));
else
puts(_("Numeric separators are off."));
}
}
/* null display */