Re: [patch] PL/Python is too lossy with floats

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Postgres Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] PL/Python is too lossy with floats
Date: 2015-06-01 09:34:41
Message-ID: CACMqXCKiaYm9iiFgc0SJ2rdgCpHMkaG94mrTfYKWQakdBeMoCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 11, 2015 at 9:49 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 3/3/15 9:32 AM, Marko Kreen wrote:
>> PL/Python uses str(v) to convert float data, but is lossy
>> by design. Only repr(v) is guaranteed to have enough
>> precision to make floats roundtrip properly:
>
> committed

In 9.3 and before, numeric is converted to float in PL/Python.

Please reconsider backporting.

--
marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Chalke 2015-06-01 10:08:55 Re: psql :: support for \ev viewname and \sv viewname
Previous Message Dean Rasheed 2015-06-01 09:21:04 Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)