Re: Can't compare decimal columns???

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
Cc: Postgres Users <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can't compare decimal columns???
Date: 2001-01-15 00:59:33
Message-ID: Pine.BSF.4.21.0101141657540.13622-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sun, 14 Jan 2001, Brett W. McCoy wrote:

> Why isn't there a >= or <= operator defined for floating point datatypes?
>
> As an example:
>
> bmccoy=> select * from account where balance between 20.00 and 99.00;
> ERROR: Unable to identify an operator '>=' for types 'numeric' and 'float8'
> You will have to retype this query using an explicit cast

I believe there was discussion about these things on -hackers a while
back. The type promotion and which type a constant is seen as is kind of
wierd right now. The query will probably work with explicit typecast to
numeric for the constants.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2001-01-15 01:03:11 Re: converting .xls to delimited file
Previous Message Tom Lane 2001-01-15 00:29:12 Re: Copying an index from one copy of a database to another