bug in Postgresql?

From: Costin Manda <siderite(at)madnet(dot)ro>
To: psql-general(at)postgresql(dot)org
Subject: bug in Postgresql?
Date: 2005-05-09 13:00:00
Message-ID: 20050509155108.531F.SIDERITE@madnet.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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));

Browse pgsql-general by date

  From Date Subject
Next Message John D. Burger 2005-05-09 13:04:49 Re: Shorthand for foreign key indices
Previous Message Dario Lah 2005-05-09 12:45:22 Re: Any experiance with PostgreSQL and SQLRelay