Re: NUMERIC and arithmetics - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: NUMERIC and arithmetics
Date
Msg-id 20020919125728.GB26021@svana.org
Whole thread Raw
In response to NUMERIC and arithmetics  (Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>)
Responses Re: NUMERIC and arithmetics  (Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>)
List pgsql-general
On Thu, Sep 19, 2002 at 02:27:21PM +0200, Christoph Dalitz wrote:
> Hello,
>
> in PG 7.1.x the NUMERIC data type makes some trouble with arithmetic and comparison
> operators:
>
>     delete from produkt where preis > 3.00;
>
> yields
>
>     ERROR:  Unable to identify an operator '>' for types 'numeric' and 'float8'
>
> preis is typed NUMERIC(8,2). Strangely, "preis > 3" works.
>
> Is this fixed in version 7.2?

If you do:

delete from produkt where preis > '3.00';

it works fine. I'm thinking we could save ourselves a lot of hassle by
requiring all constants to be quoted :)

Not gonna happen. Oh well.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

pgsql-general by date:

Previous
From: Chris Bowlby
Date:
Subject: array issue....
Next
From: Chris Bowlby
Date:
Subject: Re: array issue....