Bug with locale (decimale/group seperator in numbers) - Mailing list pgsql-bugs

From Hannes Wenzel
Subject Bug with locale (decimale/group seperator in numbers)
Date
Msg-id 200305202128.38871.h.wenzel@aon.at
Whole thread Raw
Responses Re: Bug with locale (decimale/group seperator in numbers)
List 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@postgresql.org.

To report any other bug, fill out the form below and e-mail it to
pgsql-bugs@postgresql.org.

If you not only found the problem but solved it and generated a patch
then e-mail it to pgsql-patches@postgresql.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.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
                        POSTGRESQL BUG REPORT TEMPLATE
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D


Your name               : Hannes Wenzel
Your email address      : hannes.wenzel@aon.at


System Configuration
- ---------------------
  Architecture (example: Intel Pentium)         : Intel Pentium III, 1133 M=
Hz

  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=
=20
locale support produces wrong group seperator characters.
The to_char function show a ',' as group seperator and ',' as decimal point=
.=20
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=3D/home/postgres/db/home --locale=3Dde_AT.iso885915@euro=
=20
- --username=3Dhan

then the database with:

# createdb --owner han home

The Unix user id is 'postgres' the LANG environment variable was set to=20
'de_AT.iso885915@euro'.

The description of the corresponding table is:

home=3D# \d eur
                                    Tabelle =BBpublic.eur=AB
 Spalte |             Typ             |                      Attribute
- --------+-----------------------------+----------------------------------=
-------------------
 id     | integer                     | not null default=20
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=E4rschl=FCssel btree (id)
Foreign-Key-Constraints: $1 FOREIGN KEY (curr) REFERENCES currency(id) ON=
=20
UPDATE NO ACTION ON DELETE NO ACTION

Inserted some values into the table. The following select shows the followi=
ng=20
output:

home=3D# 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.
- --=20
lg, Hannes
____________________________________________________________________

Key fingerprint =3D 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=3D
=3Dhnri
-----END PGP SIGNATURE-----

pgsql-bugs by date:

Previous
From: Jari Aalto
Date:
Subject: Suggestion: pg_hba.conf - improve postgresql-7.3.2/html/client-authentication.html
Next
From: Jari Aalto
Date:
Subject: 7.3.2 doc bug - A.1. Getting The Source Via Anonymous CVS