Re: Formatting function, simple Q

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nhrcommu(at)rochester(dot)rr(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Formatting function, simple Q
Date: 2007-06-15 14:20:14
Message-ID: 3339.1181917214@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

nhrcommu(at)rochester(dot)rr(dot)com writes:
> I reviewed
> http://www.postgresql.org/docs/current/static/functions-formatting.html
> and I am wondering in the examples section, if there is a way to avoid the
> " " between the DM and the 485.

> to_char(485, 'L999') 'DM 485

I think it's leaving that for a sign.

> Our locale, I'd be looking for '$485', without a space.

Really?

regression=# set lc_monetary TO 'en_US.iso88591';
SET
regression=# select to_char(485, 'L999');
to_char
---------
$ 485
(1 row)

Anyway, I think you need 'FM' to get rid of the unused space.

regression=# select to_char(485, 'FML999');
to_char
---------
$485
(1 row)

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message nhrcommu 2007-06-15 14:45:08 Re: Formatting function, simple Q
Previous Message nhrcommu 2007-06-15 13:43:12 Formatting function, simple Q