1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>8.2.Monetary Types</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="datatype.html" title="Chapter8.Data Types">
<link rel="prev" href="datatype.html" title="Chapter8.Data Types">
<link rel="next" href="datatype-character.html" title="8.3.Character Types">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="datatype-money"></a>8.2.Monetary Types</h2></div></div></div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p> The <code class="type">money</code> type is deprecated. Use
<code class="type">numeric</code> or <code class="type">decimal</code> instead, in
combination with the <code class="function">to_char</code> function.
</p>
</div>
<p> The <code class="type">money</code> type stores a currency amount with a fixed
fractional precision; see <a href="datatype-money.html#datatype-money-table" title="Table8.3.Monetary Types">Table8.3, “Monetary Types”</a>.
Input is accepted in a variety of formats, including integer and
floating-point literals, as well as “<span class="quote">typical</span>”
currency formatting, such as <code class="literal">'$1,000.00'</code>.
Output is generally in the latter form but depends on the locale.
</p>
<div class="table">
<a name="datatype-money-table"></a><p class="title"><b>Table8.3.Monetary Types</b></p>
<div class="table-contents"><table summary="Monetary Types" border="1">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Name</th>
<th>Storage Size</th>
<th>Description</th>
<th>Range</th>
</tr></thead>
<tbody><tr>
<td>money</td>
<td>4 bytes</td>
<td>currency amount</td>
<td>-21474836.48 to +21474836.47</td>
</tr></tbody>
</table></div>
</div>
<br class="table-break">
</div></body>
</html>
|