From: | Hannes Wenzel <h(dot)wenzel(at)aon(dot)at> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Cc: | hannes(dot)wenzel(at)aon(dot)at |
Subject: | Bug with locale (decimale/group seperator in numbers) |
Date: | 2003-05-21 04:28:16 |
Message-ID: | 200305202128.38871.h.wenzel@aon.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
If PostgreSQL failed to compile on your computer or you found a bug that
is likely to be specific to one platform then please fill out this form
and e-mail it to pgsql-ports(at)postgresql(dot)org(dot)
To report any other bug, fill out the form below and e-mail it to
pgsql-bugs(at)postgresql(dot)org(dot)
If you not only found the problem but solved it and generated a patch
then e-mail it to pgsql-patches(at)postgresql(dot)org instead. Please use the
command "diff -c" to generate the patch.
You may also enter a bug report at http://www.postgresql.org/ instead of
e-mail-ing this form.
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Hannes Wenzel
Your email address : hannes(dot)wenzel(at)aon(dot)at
System Configuration
- ---------------------
Architecture (example: Intel Pentium) : Intel Pentium III, 1133 MHz
Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.20 ELF
PostgreSQL version (example: PostgreSQL-7.3.2): PostgreSQL-7.3.2
Compiler used (example: gcc 2.95.2) : gcc 3.2.3
Please enter a FULL description of your problem:
- ------------------------------------------------
A select with a to_char function to convert number to formated output with
locale support produces wrong group seperator characters.
The to_char function show a ',' as group seperator and ',' as decimal point.
So the group seperator is wrong, the decimal point is ok.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
- ----------------------------------------------------------------------
Created a database cluster with:
# initdb --pgdata=/home/postgres/db/home --locale=de_AT(dot)iso885915(at)euro
- --username=han
then the database with:
# createdb --owner han home
The Unix user id is 'postgres' the LANG environment variable was set to
'de_AT(dot)iso885915(at)euro'.
The description of the corresponding table is:
home=# \d eur
Tabelle »public.eur«
Spalte | Typ | Attribute
- --------+-----------------------------+-----------------------------------------------------
id | integer | not null default
nextval('public.eur_id_seq'::text)
datum | timestamp without time zone | not null
curr | integer | not null
val | numeric(15,5) | not null
Indizies: eur_pkey Primärschlüssel btree (id)
Foreign-Key-Constraints: $1 FOREIGN KEY (curr) REFERENCES currency(id) ON
UPDATE NO ACTION ON DELETE NO ACTION
Inserted some values into the table. The following select shows the following
output:
home=# select val,to_char(val,'999G999G990D00') from eur;
1719000.00000 | 1,719,000,00
1389.50000 | 1,389,50
37737.00000 | 37,737,00
1737000.00000 | 1,737,000,00
The correct output should be as follows:
1719000.00000 | 1.719.000,00
1389.50000 | 1.389,50
37737.00000 | 37.737,00
1737000.00000 | 1.737.000,00
Feel free to contact me per e-mail if you have further questions.
- --
lg, Hannes
____________________________________________________________________
Key fingerprint = 33A2 A4F8 E6B9 C83F 65EF 7FD9 A6C2 3EDF DD3B 2E59
____________________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE+ywBkpsI+3907LlkRApxjAJ9s7E1Wiq9UWTP+lGMbzT7DR3Mn4gCfadam
dH/MqdxiRnAbbF1VaCyRw9M=
=hnri
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2003-05-21 11:08:19 | Primary key duplicated: NUMBER OF INDEX' TUPLES (21539) IS NOT THE SAME AS HEAP (18607)' |
Previous Message | Tom Lane | 2003-05-20 14:55:15 | Re: Bug in sequence dependency checking |