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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Дата
Msg-id 1373078878.17986.1.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: [PATCH] Fix conversion for Decimal arguments in plpython functions  (Claudio Freire <klaussfreire@gmail.com>)
Ответы Re: [PATCH] Fix conversion for Decimal arguments in plpython functions  (Claudio Freire <klaussfreire@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: [PATCH] Fix conversion for Decimal arguments in plpython functions