Subject: float operators

From: Paulo Franklin Von Paumgartten Junior <[email-masked]>
Date: Sun, 03 Apr 1994 10:02:03 -0300 (EST)

Are there any problems with float type operators?
I have tryed to use the operator '=' in a query and
have received the following message:

Query sent to backend is "retrieve 
(ent1.all) where ent1.att_1 = 567.91 "
NOTICE:Apr  3 09:58:52:there is no operator = for types float4 and float8
NOTICE:Apr  3 09:58:52:You will either have to retype this query using an
NOTICE:Apr  3 09:58:52:explicit cast, or you will have to define the 
operator

Thanks ,

Paulo Franklin

---

From: [email-masked] (Paul M. Aoki)
Date: Sun, 03 Apr 94 15:54:27 -0700

Paulo Franklin Von Paumgartten Junior <[email-masked]> writes:
> Query sent to backend is "retrieve > (ent1.all) where ent1.att_1 = 567.91 "

this has to do with the default type for a floating point constant.
the solution to this is described (1) in the manual and (2) in the 
error message, i.e., typecast the constant:
	"567.91"::float4
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki