On Thu, Apr 19, 2001 at 02:53:38PM -0500, Mark Stosberg wrote:
>
> 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
> wan
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 pr
I wrote:
> Floats are fine for money as long as you only add and subtract and don't
> deal in amounts that won't fit in the mantissa.
Ross writes:
> Or you're writing software in Germany (all of the EU now?) that _might_ get
> used in an offical capacity.
I was referring to what actually works,
On Tue, Apr 17, 2001 at 01:52:16PM -0500, John Hasler wrote:
> Ross writes:
> > But seriously, numeric(10,2) (or whatever precision and scale is correct
> > for your application) is the standard answer.
>
> Floats are fine for money as long as you only add and subtract and don't
> deal in amounts
Ross writes:
> But seriously, numeric(10,2) (or whatever precision and scale is correct
> for your application) is the standard answer.
Floats are fine for money as long as you only add and subtract and don't
deal in amounts that won't fit in the mantissa.
--
John Hasler
[EMAIL PROTECTED] (John
On Tue, Apr 17, 2001 at 10:31:49AM -0500, Mark Stosberg wrote:
> Peter Eisentraut wrote:
> >
> > Mark Stosberg writes:
> >
> > > I'm curious to know if there is a function available in Postgres 7.0.3
> > > (or 7.1) that will format a float style number as "money". I understand
> > > that the m
Peter Eisentraut wrote:
>
> Mark Stosberg writes:
>
> > I'm curious to know if there is a function available in Postgres 7.0.3
> > (or 7.1) that will format a float style number as "money". I understand
> > that the money type is going away in the future, so using a float type
> > that is some
Mark Stosberg writes:
> I'm curious to know if there is a function available in Postgres 7.0.3
> (or 7.1) that will format a float style number as "money". I understand
> that the money type is going away in the future, so using a float type
> that is sometimes formatted like money seems like a
Hello,
I'm curious to know if there is a function available in Postgres 7.0.3
(or 7.1) that will format a float style number as "money". I understand
that the money type is going away in the future, so using a float type
that is sometimes formatted like money seems like a good alternative. So