Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA00752 for postgres-dist; Mon, 29 Nov 1993 17:07:20 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311300107.RAA00752@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from utopia.CS.Berkeley.EDU (utopia.CS.Berkeley.EDU [128.32.149.5]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id RAA00743 for <postgres@nobozo.CS.Berkeley.EDU>; Mon, 29 Nov 1993 17:07:19 -0800
Received: from localhost (sunita@localhost) by utopia.CS.Berkeley.EDU (8.6.4/8.1B) id RAA07060; Mon, 29 Nov 1993 17:07:13 -0800
Date: Mon, 29 Nov 1993 17:07:13 -0800
From: Sunita Sarawagi <sunita@postgres.Berkeley.EDU>
Message-Id: <199311300107.RAA07060@utopia.CS.Berkeley.EDU>
To: jlee@cs.uml.edu, postgres@postgres.Berkeley.EDU
Subject: Re:  building indices on float4's...
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Mon, 29 Nov 93 17:07:20 -0800
Resent-XMts: smtp

	* retrieve (comp_real_data.id_number)
	where comp_real_data.date > 0.5
	\g
	
	Query sent to backend is "retrieve (comp_real_data.id_number)   where
	comp_real_data.date > 0.5 "
	NOTICE:Nov 29 17:59:50:there is no operator > for types float4 and float8
	NOTICE:Nov 29 17:59:50:You will either have to retype this query using an
	NOTICE:Nov 29 17:59:50:explicit cast, or you will have to define the
	       operator
	WARN:Nov 29 17:59:50:> for float4 and float8 using DEFINE OPERATOR
	
We are aware of this problem and will try to fix it in the next release.
float4_ops *are* defined for btrees, so that is not a problem. Using quotes
around constants is a good work around.

	* retrieve (comp_real_data.id_number)
	  where comp_real_data.date > "0.5"\g
	
	  Query sent to backend is "retrieve (comp_real_data.id_number)   where
	  comp_real_data.date > "0.5""
	  ---------------
	  | id_number   |
	  ---------------
	  Is there anything wrong with building btrees on floating point numbers?

I tried this on a small relation (with the proper index) myself and it worked 
fine. I made sure that index scan is used. So apparently for small relations 
there is no problem.  Recently there was a bug found (and corrected) in the 
btree insert routines. So, one guess is, it is related to the btree bug. Do
you want to try on a smaller relation to isolate the problem better?
	
