Select (str)::FLOAT8 BUG

From: "Rafael Villalobos Prats" <rvillalobos(at)asapci(dot)es>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Select (str)::FLOAT8 BUG
Date: 2004-02-18 15:37:44
Message-ID: DAE20F19E91DDA47B74F76B7BC07C243028854@server01.asapci.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi!,

I think i have found a bug.

I´ve tried it in PgSQL 7.3.5 & 7.4.1

When I do:

atisae_oct_1=# SELECT (1000/500/7)::FLOAT8 as v_numero;
v_numero
----------
0
(1 row)

atisae_oct_1=# SELECT 1000/500/7::FLOAT8 as v_numero;
v_numero
-------------------
0.285714285714286
(1 row)

atisae_oct_1=# SELECT (1000/500/7)::NUMERIC as v_numero;
v_numero
----------
0
(1 row)

atisae_oct_1=# SELECT 1000/500/7::NUMERIC as v_numero;
v_numero
------------------------
0.28571428571428571429
(1 row)

Why is different: 'SELECT (xxxxx)::FLOAT8' than 'SELECT xxxxx::FLOAT8'

Thanks in advance...

Rafa.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rafael Villalobos Prats 2004-02-18 15:59:32 Re: Select (str)::FLOAT8 BUG
Previous Message Fothergill, Iain 2004-02-18 15:30:31 Re: Select (str)::FLOAT8 BUG