Thread: monetary data type

monetary data type

From
Phuong Ma
Date:
I read this from the 7.1 documentation:

3.2. Monetary Type

The money type may become a locale-aware
layer over the numeric type in a future release.

The money type stores U.S.-style currency with fixed decimal point
representation. If Postgres is compiled with locale support then the
money type uses locale-specific output formatting.

----------
Why does this first say that the money type may become locale-aware in a
FUTURE release, then the next paragraph says that the money type USES
locale  specific output formatting.  So which one is it?  Why would it
be better to use numeric or decimal rather than money data type?

p.

Re: monetary data type

From
Tom Lane
Date:
Phuong Ma <pma@commandprompt.com> writes:
> I read this from the 7.1 documentation:
> 3.2. Monetary Type

> The money type may become a locale-aware
> layer over the numeric type in a future release.

> The money type stores U.S.-style currency with fixed decimal point
> representation. If Postgres is compiled with locale support then the
> money type uses locale-specific output formatting.

> ----------
> Why does this first say that the money type may become locale-aware in a
> FUTURE release, then the next paragraph says that the money type USES
> locale  specific output formatting.  So which one is it?

In that sentence, "locale-aware" is an adjective modifying "layer".
It does not say that the current implementation is not locale-aware;
it says that it's not based on numeric.

> Why would it
> be better to use numeric or decimal rather than money data type?

Overflow.

            regards, tom lane