<programlisting>
SELECT 1234::text::money;
</programlisting>
- There is no simple way of doing the reverse using a locale-neutral
- method, namely casting a <type>money</type> value to a numeric type.
+ There is no simple way of doing the reverse in a locale-independent
+ manner, namely casting a <type>money</type> value to a numeric type.
+ If you know the currency symbol and thousands separator you can use
+ <function>regexp_replace()</>:
+<programlisting>
+SELECT regexp_replace('52093.89'::money::text, '[$,]', '', 'g')::numeric;
+</programlisting>
+
</para>
<para>