Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
45a19efa
Commit
45a19efa
authored
Jul 14, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change numericsep to a boolean, and make it locale-aware.
parent
4a8bbbd2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
76 deletions
+93
-76
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+4
-5
src/bin/psql/command.c
src/bin/psql/command.c
+8
-6
src/bin/psql/print.c
src/bin/psql/print.c
+74
-62
src/bin/psql/print.h
src/bin/psql/print.h
+5
-2
src/bin/psql/startup.c
src/bin/psql/startup.c
+2
-1
No files found.
doc/src/sgml/ref/psql-ref.sgml
View file @
45a19efa
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.14
6 2005/07/10 03:46:12
momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.14
7 2005/07/14 08:42:36
momjian Exp $
PostgreSQL documentation
-->
...
...
@@ -1496,10 +1496,9 @@ lo_import 152801
<term><literal>numericsep</literal></term>
<listitem>
<para>
Specifies the character separator between groups of three digits
to the left of the decimal marker. The default is <literal>''</>
(none). Setting this to a period also changes the decimal marker
to a comma.
Toggles the display of a locale-aware character to separate groups
of digits to the left of the decimal marker. It also enables
a locale-aware decimal marker.
</para>
</listitem>
</varlistentry>
...
...
src/bin/psql/command.c
View file @
45a19efa
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.14
8 2005/07/14 06:49:58
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.14
9 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 */
...
...
src/bin/psql/print.c
View file @
45a19efa
This diff is collapsed.
Click to expand it.
src/bin/psql/print.h
View file @
45a19efa
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.2
6 2005/07/10 03:46:13
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.2
7 2005/07/14 08:42:37
momjian Exp $
*/
#ifndef PRINT_H
#define PRINT_H
...
...
@@ -40,7 +40,8 @@ typedef struct _printTableOpt
char
*
fieldSep
;
/* field separator for unaligned text mode */
char
*
recordSep
;
/* record separator for unaligned text
* mode */
char
*
numericSep
;
/* numeric units separator */
bool
numericSep
;
/* locale-aware numeric units separator and
* decimal marker */
char
*
tableAttr
;
/* attributes for HTML <table ...> */
int
encoding
;
/* character encoding */
bool
normal_query
;
/* are we presenting the results of a
...
...
@@ -86,6 +87,8 @@ typedef struct _printQueryOpt
void
printQuery
(
const
PGresult
*
result
,
const
printQueryOpt
*
opt
,
FILE
*
fout
,
FILE
*
flog
);
void
setDecimalLocale
(
void
);
#ifndef __CYGWIN__
#define DEFAULT_PAGER "more"
#else
...
...
src/bin/psql/startup.c
View file @
45a19efa
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.11
8 2005/06/21 04:02:33 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.11
9 2005/07/14 08:42:37 momjian
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -130,6 +130,7 @@ main(int argc, char *argv[])
setvbuf
(
stderr
,
NULL
,
_IONBF
,
0
);
setup_win32_locks
();
#endif
setDecimalLocale
();
pset
.
cur_cmd_source
=
stdin
;
pset
.
cur_cmd_interactive
=
false
;
pset
.
encoding
=
PQenv2encoding
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment