Re: [PATCH] Fix conversion for Decimal arguments in plpython functions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Claudio Freire <klaussfreire(at)gmail(dot)com>
Cc: Steve Singer <steve(at)ssinger(dot)info>, Szymon Guz <mabewlun(at)gmail(dot)com>, Ronan Dunklau <rdunklau(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Date: 2013-07-06 02:47:58
Message-ID: 1373078878.17986.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2013-06-28 at 17:29 -0300, Claudio Freire wrote:
> Why not forego checking of the type, and instead check the interface?
>
> plpy.info(x.as_tuple())
>
> Should do.
>
> >>> d = decimal.Decimal((0,(3,1,4),-2))
> >>> d.as_tuple()
> DecimalTuple(sign=0, digits=(3, 1, 4), exponent=-2)

I think that potentially exposes us to more version differences and
such, and it doesn't really add much value in the test output.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Freire 2013-07-06 04:23:46 Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Previous Message Peter Eisentraut 2013-07-06 02:46:38 Re: [PATCH] Fix conversion for Decimal arguments in plpython functions