BUG #1577: round(dp) function does not round to nearest integer properly

From: "Roman Schayuk" <rschayuk(at)rogers(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1577: round(dp) function does not round to nearest integer properly
Date: 2005-04-04 14:04:44
Message-ID: 20050404140444.B78DBF0B58@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1577
Logged by: Roman Schayuk
Email address: rschayuk(at)rogers(dot)com
PostgreSQL version: 7.2.2
Operating system: RedHat Linux 8.0 x86
Description: round(dp) function does not round to nearest integer
properly
Details:

SQL command:
gap=> select round(42.5);
round
-------
42
(1 row)
Result has to be 43

In contrast round(numeric, int) function works properly:
gap=> select round(42.5,0);
round
-------
43
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Celia McInnis 2005-04-04 19:28:28 BUG #1578: ::bit(n) behaves "differently" if applied to bit strings than integers.
Previous Message Dobrena Miteva 2005-04-04 09:44:21 problem with Win1251 (Cyrillic)