Thread: Locale Style - American numeric values to European numeri c values

Locale Style - American numeric values to European numeri c values

From
Elielson Fontanezi
Date:
An additional information from pg_controldata:


pg_control version number:            71
Catalog version number:               200201121
Database state:                       IN_PRODUCTION
pg_control last modified:             Wed Jul 31 15:00:25 2002
Current log file id:                  0
Next log file segment:                1
Latest checkpoint location:           0/12A4E0
Prior checkpoint location:            0/109664
Latest checkpoint's REDO location:    0/12A4E0
Latest checkpoint's UNDO location:    0/0
Latest checkpoint's StartUpID:        8
Latest checkpoint's NextXID:          121
Latest checkpoint's NextOID:          24748
Time of latest checkpoint:            Wed Jul 31 15:00:23 2002
Database block size:                  8192
Blocks per segment of large relation: 131072
LC_COLLATE:                           pt_BR
LC_CTYPE:                             C

E.F.:> -----Mensagem original-----
E.F.:> De: Elielson Fontanezi [mailto:ElielsonF@prodam.sp.gov.br]
E.F.:> Enviada em: quarta-feira, 31 de julho de 2002 15:27
E.F.:> Para: pgsql-admin
E.F.:> Assunto: [ADMIN] Locale Style - American numeric values
E.F.:> to European
E.F.:> numeric values
E.F.:>
E.F.:>
E.F.:> Hi fellow!
E.F.:>
E.F.:>     Problem: I am impossible to format numeric values from
E.F.:> American to
E.F.:> European
E.F.:> style.
E.F.:>
E.F.:>     What have I done?
E.F.:>
E.F.:>     1. The Linux RH was settled to Brazilian locale:
E.F.:>
E.F.:>     LC_COLLATE=C
E.F.:>     LC_CTYPE=C
E.F.:>     LC_MESSAGES=pt_BR
E.F.:>     LC_MONETARY=pt_BR
E.F.:>     LC_NUMERIC=pt_BR
E.F.:>     LC_TIME=pt_BR
E.F.:>
E.F.:>     2. PostGRE was compile with --enable-locale and
E.F.:> --enable-multibyte=UNICODE
E.F.:>     3. $PGDATA was created doing: initdb -D $PGDATA -E UNICODE
E.F.:>
E.F.:>     4. In postgres db the table
E.F.:>
E.F.:>     create table leo(
E.F.:>         codigo int2 primary key,
E.F.:>         dia date,
E.F.:>         valor numeric(10,2)
E.F.:>     );
E.F.:>
E.F.:>     where
E.F.:>
E.F.:>     postgres$ psql -c "select * from leo";
E.F.:>
E.F.:>          codigo |    dia     | valor
E.F.:>         --------+------------+--------
E.F.:>           1 | 2002-02-02 | 200.00
E.F.:>         (1 row)
E.F.:>
E.F.:>     The field dia and valor are still shown with american style.
E.F.:>
E.F.:>     What am I doing wrong.
E.F.:>
E.F.:>     Thanks.
E.F.:> ..............................................
E.F.:> A Question...
E.F.:> Since before your sun burned hot in space
E.F.:> and before your race was born,
E.F.:> I have awaited a question.
E.F.:>
E.F.:> Elielson Fontanezi
E.F.:> DBA Technical Support - PRODAM
E.F.:> Parque do Ibirapuera s/n - SP - BRAZIL
E.F.:> +55 11 5080 9493
E.F.:>
E.F.:>
E.F.:>
E.F.:> ---------------------------(end of
E.F.:> broadcast)---------------------------
E.F.:> TIP 5: Have you checked our extensive FAQ?
E.F.:>
E.F.:> http://www.postgresql.org/users-lounge/docs/faq.html
E.F.:>