[PATCH] Fix conversion for Decimal arguments in plpython functions

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Fix conversion for Decimal arguments in plpython functions
Date: 2013-05-28 20:41:22
Message-ID: CAFjNrYuh=4Vwnv=2N7Cj0JJuwC4HOoL1epXsOFLj6S19U02yow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I've got a patch.

This is for a plpython enhancement.

There is an item at the TODO list
http://wiki.postgresql.org/wiki/Todo#Server-Side_Languages
"Fix loss of information during conversion of numeric type to Python float"

This patch uses a decimal.Decimal type from Python standard library for the
plpthon function numeric argument instead of float.

Patch contains changes in code, documentation and tests.

Most probably there is something wrong, as this is my first Postgres patch
:)

thanks,
Szymon

Attachment Content-Type Size
plpython_decimal.patch application/octet-stream 6.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-05-28 21:07:48 Re: Unsigned integer types
Previous Message Bruce Momjian 2013-05-28 20:04:11 Re: pg_rewind, a tool for resynchronizing an old master after failover