Comparison Operator problem

From: John Burski <John(dot)Burski(at)911ep(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Comparison Operator problem
Date: 2001-01-09 21:15:50
Message-ID: 3A5B7F86.E83F4BFE@911ep.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I was working on a small "lesson" at home last night when I encountered
a strange problem with both the greater-than and
greater-than-or-equal-to comparison operators. Below are both the
description of the table I was running the query against, the one of the
queries that caused the problem, and the error message it produced.

<snip>
Table "products_tbl"
Attribute | Type | Modifier
-----------+--------------+----------
prod_id | varchar(10) | not null
prod_desc | varchar(40) | not null
cost | numeric(6,2) | not null
Index: products_tbl_pkey

john=# select * from products_tbl
john-# where cost > .99;
ERROR: Unable to identify an operator '>' for types 'numeric' and
'float8'
You will have to retype this query using an explicit cast
</snip>

I did a "\do" to take a look at the available operators. Both of them
were there for both "numeric" and "float8".

I should mention that I'm running 7.0.3 on Red Hat 6.1. It was
installed via RPMs.

Thanks.

--
John Burski
Chief IT Cook and Bottlewasher
911 Emergency Products, St. Cloud, MN
(320) 656 0076 www.911ep.com

++++++++++++++++++++++++++++++++++
+ How's your cheese holding out? +
++++++++++++++++++++++++++++++++++

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bilal Tayara 2001-01-09 21:22:35 arabic support?
Previous Message Tom Lane 2001-01-09 17:05:16 Re: Re: Advice on stored proc error handling versus Sybase?