Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,

Поиск
Список
Период
Сортировка
От Roman Kononov
Тема Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,
Дата
Msg-id 4592DAD8.1000400@xtremedatainc.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #2846: inconsistent and confusing handling of  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-patches
On 12/27/2006 12:44 PM, Bruce Momjian wrote:
> The only unsolved issue is the one with underflow checks.  I have added
> comments explaining the problem in case someone ever figures out how to
> address it.

This will behave better for float4:

    Datum float4pl(PG_FUNCTION_ARGS)
    {
---    float4  arg1 = PG_GETARG_FLOAT4(0);
---    float4  arg2 = PG_GETARG_FLOAT4(1);
+++    double  arg1 = PG_GETARG_FLOAT4(0);
+++    double  arg2 = PG_GETARG_FLOAT4(1);
        double  result;

        result = arg1 + arg2;
        CheckFloat4Val(result,isinf(arg1) || isinf(arg2));
        PG_RETURN_FLOAT4((float4) result);
}

Roman

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

Предыдущее
От: Mason
Дата:
Сообщение: Fwd: I would like to alter the COPY command
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Bundle of patches