pgsql: PL/Python: Convert numeric to Decimal

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: PL/Python: Convert numeric to Decimal
Date: 2013-07-06 02:43:57
Message-ID: E1UvITd-0003HZ-0g@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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(at)gmail(dot)com>
From: Ronan Dunklau <rdunklau(at)gmail(dot)com>
Reviewed-by: Steve Singer <steve(at)ssinger(dot)info>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7919398bac8bacd75ec5d763ce8b15ffaaa3e071

Modified Files
--------------
doc/src/sgml/plpython.sgml | 23 +++++++++---
src/pl/plpython/expected/plpython_types.out | 49 +++++++++++++++++++++----
src/pl/plpython/expected/plpython_types_3.out | 49 +++++++++++++++++++++----
src/pl/plpython/plpy_typeio.c | 42 ++++++++++++++++-----
src/pl/plpython/sql/plpython_types.sql | 9 ++++-
5 files changed, 138 insertions(+), 34 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-07-06 05:39:32 Re: [COMMITTERS] pgsql: PL/Python: Convert numeric to Decimal
Previous Message Noah Misch 2013-07-05 19:38:21 pgsql: Update messages, comments and documentation for materialized vie

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-07-06 02:46:38 Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Previous Message Satoshi Nagayasu 2013-07-06 01:30:28 Re: pg_filedump 9.3: checksums (and a few other fixes)