Re: Formatting function, simple Q - Mailing list pgsql-novice

From Tom Lane
Subject Re: Formatting function, simple Q
Date
Msg-id 3339.1181917214@sss.pgh.pa.us
Whole thread Raw
In response to Formatting function, simple Q  (nhrcommu@rochester.rr.com)
Responses Re: Formatting function, simple Q  (nhrcommu@rochester.rr.com)
List pgsql-novice
nhrcommu@rochester.rr.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

pgsql-novice by date:

Previous
From: nhrcommu@rochester.rr.com
Date:
Subject: Formatting function, simple Q
Next
From: nhrcommu@rochester.rr.com
Date:
Subject: Re: Formatting function, simple Q