Re: function to format floats as money? (removing space padding) - Mailing list pgsql-sql

From Mark Stosberg
Subject Re: function to format floats as money? (removing space padding)
Date
Msg-id 3ADF4218.6604D76C@summersault.com
Whole thread Raw
In response to Re: function to format floats as money?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: function to format floats as money? (removing space padding)
List pgsql-sql
Now that I've figured out that numeric is good for storing money, and
that I can format with like this:

to_char(price, '9,999,999.99') as price

Then I discovered that sometimes this returns leading spaces I don't
want. I can get rid of them like this:

trim(to_char(price, '9,999,999.99')) as price

Is that the recommended money formatting style, for amounts less than
9,999,999.99? (assuming I'll tack on my own currency symbol? ). Other
there other general styles that folks like for this? Thanks,
 -mark

personal website             }      Summersault Website Development
http://mark.stosberg.com/    {      http://www.summersault.com/


pgsql-sql by date:

Previous
From: Joel Burton
Date:
Subject: Re: Postgresql to Access
Next
From: "Oliver Elphick"
Date:
Subject: Re: copy into serial field with auto_increment