| From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
|---|---|
| To: | Pedro Gimeno <pgsql-004(at)personal(dot)formauri(dot)es> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, rschaaf(at)commoninf(dot)com, pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #12885: The result of casting a double to an integer depends on the database version |
| Date: | 2015-03-25 11:46:14 |
| Message-ID: | CAB7nPqQ=as+tSE6kA36RLpbueb__Zj_=L+wWonKMH5-nczj3yg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Wed, Mar 25, 2015 at 8:18 PM, Pedro Gimeno
<pgsql-004(at)personal(dot)formauri(dot)es> wrote:
> Michael Paquier wrote, On 2015-03-25 04:26:
>> copysign is not that portable, at least it is not in the MSVC world.
>> So as a patch you would get something like the attached with what you
>> wrote.
>
> The only point of using copysign there was to deal with a negative zero
> corner case. The attached removes copysign from the test program too,
> relying instead on sprintf outputting the sign of minus zero when available.
Cool, thanks. Applied to the code tree of Postgres, it gives the patch attached.
--
Michael
| Attachment | Content-Type | Size |
|---|---|---|
| 20150325_rint_portfix.patch | application/x-patch | 506 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jaimin Pan | 2015-03-25 13:59:17 | [Report Bug With Patch] Rel Cache Bug |
| Previous Message | Pedro Gimeno | 2015-03-25 11:18:09 | Re: BUG #12885: The result of casting a double to an integer depends on the database version |