Re: Correction: Working on "SELECT * WHERE numeric_col =

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Bob Jones <bjones(at)autoresourcesinc(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Correction: Working on "SELECT * WHERE numeric_col =
Date: 2001-12-14 02:02:41
Message-ID: 20011213175317.B6001-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Thu, 13 Dec 2001, Bob Jones wrote:

> I would like to correct a misprint on my original post. Earlier I stated:
>
> ... an error stating that the '-' operator is unidentified for numeric and
> float8 types....
>
> The "unidentified operator" should be the "=" operator (as shown correctly
> in the SQL query example of my original post), not the "-" operator as
> previously mentioned.

Well, the current easiest way to get around it is to either explicitly
cast the constant to numeric or single quote it (otherwise it's treated
as float8). Although you could get rid of the error by defining the
functions and making the operators, I'm not sure what'd be involved in
getting index scans to work properly.

There's been talk about working on the type system stuff for int, float,
numeric, etc, but I don't think a concensus was reached on what should be
done (you can check the hackers archives).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2001-12-14 05:08:21 Re: storing intermediate results from recursive plpgsql
Previous Message Tom Lane 2001-12-14 02:01:52 Re: Working on "SELECT * WHERE numeric_col = 2001.2" problem?