Re: Bug #878: different format of float values in 7.2.and 7.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: D(dot)N(dot)Stepanov(at)inp(dot)nsk(dot)su, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #878: different format of float values in 7.2.and 7.3
Date: 2003-01-20 15:14:25
Message-ID: 2964.1043075665@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> The following line:
> SELECT 1875/1000.0
> produces different results. In 7.2.3 it is:
> ?column?
> ---------------------
> 1.875

> while in 7.3.1 it is:
> ?column?
> ---------------------
> 1.87500000000000000

The above expression is taken as NUMERIC datatype in 7.3, rather than
FLOAT8 as it was in 7.2. To get the same output as before, try
SELECT 1875/1000.0::float8;

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Denis N. Stepanov 2003-01-20 15:24:29 Re: Bug #878: different format of float values in 7.2.and
Previous Message Marcin Winkler 2003-01-20 11:41:48 Re: Bug #878: different format of float values in 7.2.and