File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 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>
You can’t perform that action at this time.
0 commit comments