Re: Bug #878: different format of float values in 7.2.and - Mailing list pgsql-bugs

From Denis N. Stepanov
Subject Re: Bug #878: different format of float values in 7.2.and
Date
Msg-id Pine.LNX.4.33.0301202119450.10011-100000@Linda.inp.nsk.su
Whole thread Raw
In response to Re: Bug #878: different format of float values in 7.2.and 7.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, 20 Jan 2003, Tom Lane wrote:

TL> pgsql-bugs@postgresql.org writes:
TL> > The following line:
TL> > SELECT 1875/1000.0
TL> > produces different results. In 7.2.3 it is:
TL> >       ?column?
TL> > ---------------------
TL> >        1.875
TL>
TL> > while in 7.3.1 it is:
TL> >       ?column?
TL> > ---------------------
TL> >  1.87500000000000000
TL>
TL> The above expression is taken as NUMERIC datatype in 7.3, rather than
TL> FLOAT8 as it was in 7.2.  To get the same output as before, try
TL>     SELECT 1875/1000.0::float8;

Thanks. The main thing I understood is that it was done intentionally. Is there
a kind of document (mail message maybe) that describes the intentions to make
typecasts more strict and/or pecularities of such changes? I guess many users
faced with similar problems, probably it was already explained somewhere.

--
  Regards,
             Den.

pgsql-bugs by date:

Previous
From: Catarina Monica
Date:
Subject: Postgres 7.3 in PPC
Next
From: remyapl@cppdnotes.iobnet.co.in
Date:
Subject: