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

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #878: different format of float values in 7.2.and 7.3
Date: 2003-01-20 08:13:38
Message-ID: 20030120081338.B363F475FD4@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Denis N.Stepanov (D(dot)N(dot)Stepanov(at)inp(dot)nsk(dot)su) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
different format of float values in 7.2.and 7.3

Long Description
There is a difference in return value of some floating point operations in PostgreSQL 7.2 and 7.3. The return value in 7.3 contains padding to the right zeroes, while in 7.2 it does not. This is a compartibility problem in fact since our application used to deal with exact float strings without any unnecessary padding zeroes. I use a usual postgresql*-7.3.1-1PGDG.i386.rpm taken from your site, if it makes sense. Please take a look into this.

Sample Code
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

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marcin Winkler 2003-01-20 11:41:48 Re: Bug #878: different format of float values in 7.2.and
Previous Message pgsql-bugs 2003-01-19 17:36:21 Bug #877: numbers are no longer recognized as smallints