diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/plpython.sgml | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index aaf758d4959..ad89355d60d 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -310,12 +310,23 @@ $$ LANGUAGE plpythonu; <listitem> <para> - PostgreSQL <type>real</type>, <type>double</type>, - and <type>numeric</type> are converted to - Python <type>float</type>. Note that for - the <type>numeric</type> this loses information and can lead to - incorrect results. This might be fixed in a future - release. + PostgreSQL <type>real</type> and <type>double</type> are converted to + Python <type>float</type>. + </para> + </listitem> + + <listitem> + <para> + PostgreSQL <type>numeric</type> is converted to + Python <type>Decimal</type>. This type is imported from + the <literal>cdecimal</literal> package if that is available. + Otherwise, + <literal>decimal.Decimal</literal> from the standard library will be + used. <literal>cdecimal</literal> is significantly faster + than <literal>decimal</literal>. In Python 3.3, + however, <literal>cdecimal</literal> has been integrated into the + standard library under the name <literal>decimal</literal>, so there is + no longer any difference. </para> </listitem> |