Re: BUG #3230: Division problem

From: Theodore Petrosky <tedpet5(at)yahoo(dot)com>
To: Jeferson Kasper <jefersonkasper(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3230: Division problem
Date: 2007-04-16 18:17:30
Message-ID: 446604.7380.qm@web38410.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

try:

select 30/50::float;

?column?
----------
0.6
(1 row)

Ted

--- Jeferson Kasper <jefersonkasper(at)gmail(dot)com> wrote:

>
> The following bug has been logged online:
>
> Bug reference: 3230
> Logged by: Jeferson Kasper
> Email address: jefersonkasper(at)gmail(dot)com
> PostgreSQL version: 8.1.5
> Operating system: Linux RedHat 9
> Description: Division problem
> Details:
>
> i was trying to divide a number and the result is
> always wrong, and i tried
> to calculate in psql this query:
>
> select (30/50);
>
> and the result was zero ( 0 ), and it have to be
> 0.6...
> i dont know what i have done wrong... but, i think
> its a bug.
> thanks for all.
>
> Jeferson Kasper
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jon Sime 2007-04-16 18:18:27 Re: BUG #3230: Division problem
Previous Message Heikki Linnakangas 2007-04-16 18:06:51 Re: BUG #3231: Duplicate rows primary key bug