Skip site navigation (1) Skip section navigation (2)

round(50.5) = 50

From: Philipp Matthias Hahn <Philipp(dot)Hahn(at)informatik(dot)uni-oldenburg(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: round(50.5) = 50
Date: 2004-02-27 08:38:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs

# SELECT round(5.5::float4),round(50.5::float4);
  round | round
      6 |    50
(1 row)

I think this is a bug, since I would expect 6 and 51. Doing the same 
without the float4-cast, it works correct. This bug bites me while 
passing parameters to a plpgsql function.

This happens both with Debian 7.3.4-9 and 7.4.1-3

Is this a real bug or am I missing something? A bug fix or work-around 
would be nice.

       Dipl.-Inform. Philipp(dot)Hahn(at)informatik(dot)uni-oldenburg(dot)de
       Abteilung Systemsoftware und verteilte Systeme, Fk. II
Carl von Ossietzky Universitaet Oldenburg, 26111 Oldenburg, Germany
       Telefon: +49 441 798-2866    Telefax: +49 441 798-2756


pgsql-bugs by date

Next:From: PostgreSQL Bugs ListDate: 2004-02-27 11:40:07
Subject: BUG #1086: lower and upper functions
Previous:From: Tom LaneDate: 2004-02-27 06:00:15
Subject: Re: intermittent error: 'variable not found in subplan target list' - INCOMPLETE SUBMISSION

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group