Return-Path: mao
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA07714; Wed, 16 Dec 92 10:40:31 -0800
Message-Id: <9212161840.AA07714@postgres.Berkeley.EDU>
From: <mao@postgres.berkeley.edu>
Subject: Re: float4's
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Wed, 16 Dec 92 04:11:51 PST.
             <9212161211.AA06229@postgres.Berkeley.EDU> 
Date: Wed, 16 Dec 92 10:42:40 PST

In message <9212161211.AA06229@postgres.Berkeley.EDU> you write:

>   * 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 operat
  +or
>   WARN:Dec 15 16:26:24:> for float4 and float8 using DEFINE OPERATOR
>   * \q
> 
> 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.

you can say

    * retrieve (floattest.all) where floattest.num > "0.0"::float4\g

in general, "xxxx"::typename casts the value xxxx to type typename.

					mike
