Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee13b73

Browse files
committed
Add documentation about the issues of casting MONEY to/from numeric
types.
1 parent91e9558 commitee13b73

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 $ -->
22

33
<chapter id="datatype">
44
<title id="datatype-title">Data Types</title>
@@ -842,6 +842,14 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab
842842
floating-point literals, as well as <quote>typical</quote>
843843
currency formatting, such as <literal>'$1,000.00'</literal>.
844844
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.
845853
</para>
846854

847855
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp