Re: Trouble with float4 after upgrading from 6.5.3 to 7.0.2 - Mailing list pgsql-general

From Romanenko Mikhail
Subject Re: Trouble with float4 after upgrading from 6.5.3 to 7.0.2
Date
Msg-id 018a01c000ed$1966f1c0$01011aac@angg.ru
Whole thread Raw
In response to Trouble with float4 after upgrading from 6.5.3 to 7.0.2  ("Romanenko Mikhail" <mikhail@angg.ru>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> A general comment on your table design though: anyone who expects exact
> equality tests on fractional float values to succeed is going to get
> burnt sooner or later.  If you must use this style of coding then
> I recommend using numeric fields not float fields, and certainly not
> float4 fields.
>
> regards, tom lane

I try 'numeric', 'decimal', and 'float8' types and only 'float8' works. Both 'decimal' and 'numeric' failed (as
'float4'did) with error message: "Unable to identify an operator '=' for type numeric and 'float8' You will have to
retypethis query using an explicite cast". 

And though my problem is solved, thank you for the help, I thought perhaps this information will be usefull for you.

Mikhail.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump help
Next
From: "Len Morgan"
Date:
Subject: Fw: pg_dump help -- Problem Fixed -- Thank you all!!!