[GENARAL] round() bug? - Mailing list pgsql-general

From Willy-Bas Loos
Subject [GENARAL] round() bug?
Date
Msg-id CAHnozTih85ea8HHDoSvK0fSJQkSOY=E76Acsi1FFZyiNM4bWsw@mail.gmail.com
Whole thread Raw
Responses Re: [GENARAL] round() bug  (David G Johnston <david.g.johnston@gmail.com>)
List pgsql-general
Hi,
I ran into some strange behavior.
Seems like a bug to me?

wbloos=# select round(0.5::numeric), round(0.5::double precision);
 round | round
-------+-------
     1 |     0
(1 row)

wbloos=# select version();
                                                   version                                                   
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.13 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1, 64-bit
(1 row)

Cheers,
--
Willy-Bas Loos

pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: streaming replication + wal shipping
Next
From: Vincent Veyron
Date:
Subject: Re: Approach to Data Summary and Analysis