From: | Roman Kononov <roman(at)xtremedatainc(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows, |
Date: | 2006-12-27 20:43:04 |
Message-ID: | 4592DAD8.1000400@xtremedatainc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers 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
From | Date | Subject | |
---|---|---|---|
Next Message | mark | 2006-12-27 20:44:36 | Re: Bitmap index thoughts |
Previous Message | Tom Lane | 2006-12-27 20:29:48 | Re: Allow the identifier length to be increased via a configure option |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-12-27 21:23:39 | Re: [BUGS] BUG #2846: inconsistent and confusing handling of |
Previous Message | Tom Lane | 2006-12-27 20:29:48 | Re: Allow the identifier length to be increased via a configure option |