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

Поиск
Список
Период
Сортировка
От Steve Singer
Тема Re: [PATCH] Fix conversion for Decimal arguments in plpython functions
Дата
Msg-id BLU0-SMTP68323457DEFD9CF0B81500DC760@phx.gbl
обсуждение исходный текст
Ответ на Re: [PATCH] Fix conversion for Decimal arguments in plpython functions  (Szymon Guz <mabewlun@gmail.com>)
Ответы Re: [PATCH] Fix conversion for Decimal arguments in plpython functions  (Szymon Guz <mabewlun@gmail.com>)
Re: [PATCH] Fix conversion for Decimal arguments in plpython functions  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-hackers
On 06/27/2013 05:04 AM, Szymon Guz wrote:
> On 27 June 2013 05:21, Steve Singer <steve@ssinger.info
> <mailto:steve@ssinger.info>> wrote:
>
>     On 06/26/2013 04:47 PM, Szymon Guz wrote:
>
>
>
>
>
>
> Hi Steve,
> thanks for the changes.
>
> You're idea about common code for decimal and cdecimal is good,
> however not good enough. I like the idea of common code for decimal
> and cdecimal. But we need class name, not the value.
>
> I've changed the code from str(x) to x.__class__.__name__ so the
> function prints class name (which is Decimal for both packages), not
> the value. We need to have the class name check. The value is returned
> by the function and is a couple of lines lower in the file.
>
> patch is attached.
>

I think the value is more important than the name, I want to the tests
to make sure that the conversion is actually converting properly.  With
your method of getting the class name without the module we can have both.

The attached patch should print the value and the class name but not the
module name.

Steve


> thanks,
> Szymon
>
>
>
>
>
>


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Add more regression tests for ASYNC
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: FILTER for aggregates [was Re: Department of Redundancy Department: makeNode(FuncCall) division]