select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Supported versions: Current (18) / 17 / 16 / 15 / 14
Development versions: 19 / devel
Unsupported versions: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3 / 7.2 / 7.1
Historical version. PostgreSQL 7.1 reached end of support in April 2006. See the current version for supported releases.

3.2. Monetary Type

Deprecated: The money type is deprecated. Use numeric or decimal instead, in combination with the to_char function. 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.

Input is accepted in a variety of formats, including integer and floating point literals, as well as "typical" currency formatting, such as '$1,000.00'. Output is in the latter form.

Table 3-3. Monetary Types

Type Name Storage Description Range
money 4 bytes Fixed-precision -21474836.48 to +21474836.47

Report a documentation issue

Read the upstream documentation. For corrections, first check the current version.