Re: [PATCH] Fix conversion for Decimal arguments in plpython functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Date
Msg-id 1373078878.17986.1.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: [PATCH] Fix conversion for Decimal arguments in plpython functions  (Claudio Freire <klaussfreire@gmail.com>)
Responses Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
List 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.





pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Next
From: Claudio Freire
Date:
Subject: Re: [PATCH] Fix conversion for Decimal arguments in plpython functions