Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA06229; Wed, 16 Dec 92 04:11:51 -0800
Date: Wed, 16 Dec 92 04:11:51 -0800
Message-Id: <9212161211.AA06229@postgres.Berkeley.EDU>
From: dean@tpsl.cuc.ab.ca (Dean Huxley)
Subject: float4's
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu

I am having a problem with doing anything with float4's.

Here is a script:

  % monitor -q testdb
  * create floattest (num = float4)\g
  CREATE
  * append floattest (num = -1.0)\g
  WARN:Dec 15 16:24:55:unequal type in tlist : num

  * retrieve (floattest.all) where floattest.num > 0.0\g
  NOTICE:Dec 15 16:26:24:there is no operator > for types float4 and float8
  NOTICE:Dec 15 16:26:24:You will either have to retype this query using an
  NOTICE:Dec 15 16:26:24:explicit cast, or you will have to define the operator
  WARN:Dec 15 16:26:24:> for float4 and float8 using DEFINE OPERATOR
  * \q

Similar results occur when using the libpq commands.

It appears that any floating point number passed to the backend is
interpreted as a float8.  In the warning notice for the retrieve, it
mentions explicit casting.  How do I accomplish this?  I have looked
through the manual and can find no mention of casting.

It appears as if I will have to define a bunch of float84* functions
similar to the int42* functions.  Has anyone done this before?

Any help will be greatly appreciated!

Dean Huxley (dean@tpsl.cuc.ab.ca)
