I run the following sql statements in linux and get the results:
postgres=# create table test_double(col1 float8);
CREATE TABLE
postgres=# insert into test_double values(1.7976931348623159E308);
INSERT 0 1
postgres=# select * from test_double;
col1
--
Infinity
(1 row)
but in windows:
I also have a question here:
isn't dpow enough for calculation?
Why added numeric_power?
Tom Lane [EMAIL PROTECTED] дÈëÏûÏ¢ÐÂÎÅ:[EMAIL PROTECTED]
Richard Wang [EMAIL PROTECTED] writes:
I expected 0 ^ 123.3 to be 0, but it reported error as follows
postgres=# select 0 ^ 123.3;
ERROR: cannot
I expected 0 ^ 123.3 to be 0, but it reported error as follows
postgres=# select 0 ^ 123.3;
ERROR: cannot take logarithm of zero
I find that there is a bug in numeric_power() function
the function caculates a ^ b based on the algorithm e ^ (lna * b)
as you see, ln0 is not valid
--
Sent via
I just consider this may happens and pg can't recover correctly:
if postgres crashed last time and left a postmaster.pid file, and last
postgres
id is reused by another process which is not postgres now.
Tom Lane [EMAIL PROTECTED] дÈëÏûÏ¢ÐÂÎÅ:[EMAIL PROTECTED]
Richard Wang [EMAIL PROTECTED
I construct a postmaster.pid file and then set the pid to be one of existing
process id(not postgres, e.g vim), then I run postgres. This may happen if
postgres crashed last time and left a postmaster.pid file, and last postgres
id is reused by another process which is not postgres now.
What I