data export has strange decimal values

From: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: data export has strange decimal values
Date: 2016-12-28 17:41:19
Message-ID: CY1PR0201MB14365168F96CF795B33A18629D680@CY1PR0201MB1436.namprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm using postgresql9.2. When I export some data using phppgadmin some decimal values are exported as 9.4700003 instead of 9.47 (they show as 9.47 in phppgadmin and when displayed on the web. Others export as 9.5299997 instead of 9.53 (again they show as 9.53 in phppgadmin and when displayed on the web).

The data type for the field is set as type "real." Is this data type causing the problem and I should change it to decimal?

What could be creating this plus or minus 0.0000003 to the recorded value?

Thanks

Marc

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Steve Crawford 2016-12-28 19:19:19 Re: data export has strange decimal values
Previous Message Tom Lane 2016-12-26 23:25:47 Re: localized fulltext search