| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Bill Moran <wmoran(at)potentialtech(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: L doesn't seem to be working in to_char() |
| Date: | 2004-03-16 19:46:34 |
| Message-ID: | 200403161946.i2GJkY508084@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Bill Moran wrote:
> The user guide says that L should produce the currency symbol as defined
> by the locale. It doesn't seem to be working for me.
>
> agelis=# select to_char(1257.5, 'LFM999G999G999G999D99');
> to_char
> ----------
> 1,257.5
> (1 row)
>
> Can anyone confirm that this is a problem, or have I made a mistake
> somewhere? I'm running 7.4.1 on FreeBSD.
I got it working on FreeBSD 4.9. The fix was to set lc_monetary
properly:
template1=# set lc_monetary = 'en_US.ISO8859-1';
SET
template1=# select to_char(1257.5, 'LFM999G999G999G999D99');
to_char
----------
$1,257.5
(1 row)
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mark Lubratt | 2004-03-16 19:58:29 | fsync |
| Previous Message | Paul Thomas | 2004-03-16 19:41:42 | Re: Network Connection |