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
b85cf684
Commit
b85cf684
authored
Nov 22, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more comments about thousands separator handling.
parent
f608f3b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/backend/utils/adt/formatting.c
src/backend/utils/adt/formatting.c
+2
-1
src/bin/psql/print.c
src/bin/psql/print.c
+3
-1
No files found.
src/backend/utils/adt/formatting.c
View file @
b85cf684
/* -----------------------------------------------------------------------
/* -----------------------------------------------------------------------
* formatting.c
* formatting.c
*
*
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.13
5 2007/11/22 15:10:05
momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.13
6 2007/11/22 17:51:39
momjian Exp $
*
*
*
*
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
...
@@ -3926,6 +3926,7 @@ NUM_prepare_locale(NUMProc *Np)
...
@@ -3926,6 +3926,7 @@ NUM_prepare_locale(NUMProc *Np)
*
*
* Some locales (e.g. broken glibc pt_BR), have a comma for decimal,
* Some locales (e.g. broken glibc pt_BR), have a comma for decimal,
* but "" for thousands_sep, so we set the thousands_sep too.
* but "" for thousands_sep, so we set the thousands_sep too.
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg00772.php
*/
*/
if
(
lconv
->
thousands_sep
&&
*
lconv
->
thousands_sep
)
if
(
lconv
->
thousands_sep
&&
*
lconv
->
thousands_sep
)
Np
->
L_thousands_sep
=
lconv
->
thousands_sep
;
Np
->
L_thousands_sep
=
lconv
->
thousands_sep
;
...
...
src/bin/psql/print.c
View file @
b85cf684
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.9
3 2007/11/22 15:10:05
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.9
4 2007/11/22 17:51:39
momjian Exp $
*
*
* Note: we include postgres.h not postgres_fe.h so that we can include
* Note: we include postgres.h not postgres_fe.h so that we can include
* catalog/pg_type.h, and thereby have access to INT4OID and similar macros.
* catalog/pg_type.h, and thereby have access to INT4OID and similar macros.
...
@@ -2037,6 +2037,8 @@ setDecimalLocale(void)
...
@@ -2037,6 +2037,8 @@ setDecimalLocale(void)
grouping
=
strdup
(
extlconv
->
grouping
);
grouping
=
strdup
(
extlconv
->
grouping
);
else
else
grouping
=
"3"
;
/* most common */
grouping
=
"3"
;
/* most common */
/* similar code exists in formatting.c */
if
(
*
extlconv
->
thousands_sep
)
if
(
*
extlconv
->
thousands_sep
)
thousands_sep
=
strdup
(
extlconv
->
thousands_sep
);
thousands_sep
=
strdup
(
extlconv
->
thousands_sep
);
/* Make sure thousands separator doesn't match decimal point symbol. */
/* Make sure thousands separator doesn't match decimal point symbol. */
...
...
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