| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Tony Grant <tony(at)tgds(dot)net> |
| Cc: | postgres list <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: converting from one locale to another |
| Date: | 2003-06-13 13:40:17 |
| Message-ID: | 239.1055511617@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Tony Grant <tony(at)tgds(dot)net> writes:
> I need to convert an existing database from the default locale to locale
> fr_FR because the client is fed up of using "." as a decimal
> separator...
> Can I just import my dump file and all the decimal points will be
> converted auto-magically?
You do not need to dump/reload to change LC_MONETARY; a quick SET will
do, or change the default in postgresql.conf.
That's the good news. The bad news is that ordinary I/O of numbers does
not pay attention to LC_MONETARY (by design, and per SQL spec, so don't
bother complaining). The only formatting that does pay attention is
to_char() and to_number() conversion. So, while you don't need to do
anything much to your data, you do have a bit of SQL coding in front
of you to use those functions where appropriate.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-06-13 13:55:12 | Re: Insert NULL for '' |
| Previous Message | Tom Lane | 2003-06-13 13:33:26 | Re: query plan and parenthesis |