]> granicus.if.org Git - postgresql/commit
PL/Python: Convert numeric to Decimal
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 6 Jul 2013 02:41:25 +0000 (22:41 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 6 Jul 2013 02:41:25 +0000 (22:41 -0400)
commit7919398bac8bacd75ec5d763ce8b15ffaaa3e071
treee5c1a77a161560da6ce1a6879f9bf3d3408a81eb
parent02d2b694ee42a9e241d37ce67df122fff43d5bb9
PL/Python: Convert numeric to Decimal

The old implementation converted PostgreSQL numeric to Python float,
which was always considered a shortcoming.  Now numeric is converted to
the Python Decimal object.  Either the external cdecimal module or the
standard library decimal module are supported.

From: Szymon Guz <mabewlun@gmail.com>
From: Ronan Dunklau <rdunklau@gmail.com>
Reviewed-by: Steve Singer <steve@ssinger.info>
doc/src/sgml/plpython.sgml
src/pl/plpython/expected/plpython_types.out
src/pl/plpython/expected/plpython_types_3.out
src/pl/plpython/plpy_typeio.c
src/pl/plpython/sql/plpython_types.sql