Search Postgresql Archives

bug in Postgresql?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Today I stumbled upon a very strange error. I was getting tired of
getting errors when I tried using function round(double
precision,integer) so I decided to build one of my own. I did*, then I
issued 
select round(1.3333333333333333::double precision,2)
To this the connection to the postgres server was lost, even if the
postgres server itself did not crash. When I tried another query (a
valid one) I got a response about having to do the query again since the
server suffered a problem and there could be possible memory corruption.
Next queries went ok.

However, if I created the function as saferound(double precision,
integer) it worked with no problems.

* the function was a plpgsql function that returned
$1*round(exp($2*ln(10)))/round(exp($2*ln(10));

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux