From: | Huong Dangminh <huo-dangminh(at)ys(dot)jp(dot)nec(dot)com> |
---|---|
To: | Euler Taveira <euler(at)timbira(dot)com(dot)br> |
Cc: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>, Akio Iwaasa <aki-iwaasa(at)vt(dot)jp(dot)nec(dot)com> |
Subject: | RE: power() function in Windows: "value out of range: underflow" |
Date: | 2018-04-10 23:46:49 |
Message-ID: | 75DB81BEEA95B445AE6D576A0A5C9E936A73F249@BPXM05GP.gisp.nec.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hi,
Thanks for response
# I will add this thread to current CF soon.
> 2018-04-10 5:30 GMT-03:00 Huong Dangminh <huo-dangminh(at)ys(dot)jp(dot)nec(dot)com>:
> > There are some cases that power() function does not work correctly
> > with 'NaN' arguments in Windows environment.
> > Something like,
> >
> What is your exact OS version? What is your postgres version? I tested with
> Windows 10 (10.0.16299) x64 and couldn't reproduce the error.
I think it is not depended on OS version but the visual c++ runtime libraries version
(It seem also be included in installers).
My environment:
====================================
- PostgreSQL: 9.6.8
# I am using the EDB PostgreSQL Installer
# It also can reproduce in PostgreSQL 10.3 or 9.5.12
>postgres -V
postgres (PostgreSQL) 9.6.8
>psql -c "select version()"
version
-------------------------------------------------------------
PostgreSQL 9.6.8, compiled by Visual C++ build 1800, 64-bit
(1 row)
>psql -c "select 'NaN'^11"
ERROR: value out of range: underflow
- OS: Microsoft Windows 10 Pro 10.0.14393 build 14393
=============================
> > postgres=# select power('NaN',11);
> > ERROR: value out of range: underflow
> > postgres=# select power('NaN','NaN');
> > ERROR: value out of range: underflow
> > postgres=# select power(11,'NaN');
> > ERROR: value out of range: underflow
> >
> > In Linux environment, instead of ERROR it returns 'NaN'.
> >
> Could you show us a simple test case? Print arguments, result and errno.
It just is my confirmation when debug PostgreSQL in Windows environment.
# I built PostgreSQL with VC++ 2012 in debug mode and confirmed.
I don't know how to print those values.
---
Thanks and best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/
From | Date | Subject | |
---|---|---|---|
Next Message | Soni M | 2018-04-11 00:32:22 | Re: pg_dump with disable trigger |
Previous Message | David G. Johnston | 2018-04-10 23:46:46 | Re: pg_dump with disable trigger |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-04-10 23:53:29 | Re: Gotchas about pg_verify_checksums |
Previous Message | Michael Paquier | 2018-04-10 23:44:34 | Re: Gotchas about pg_verify_checksums |