|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.217 2007/11/21 04:01:37 tgl Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.218 2007/11/27 05:49:58 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="datatype">
|
4 | 4 | <title id="datatype-title">Data Types</title>
|
@@ -842,6 +842,14 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab
|
842 | 842 | floating-point literals, as well as <quote>typical</quote>
|
843 | 843 | currency formatting, such as <literal>'$1,000.00'</literal>.
|
844 | 844 | Output is generally in the latter form but depends on the locale.
|
| 845 | + Non-quoted numeric values can be converted to <type>money</type> by |
| 846 | + casting the numeric value to <type>text</type> and then |
| 847 | + <type>money</type>: |
| 848 | +<programlisting> |
| 849 | +SELECT 1234::text::money; |
| 850 | +</programlisting> |
| 851 | + There is no simple way of doing the reverse; casting a <type>money</type> value to a |
| 852 | + numeric type. |
845 | 853 | </para>
|
846 | 854 |
|
847 | 855 | <para>
|
|