Re: doesn't recognize "!=-" (not equal to a negative value)

From: "Tim Hart" <tjhart(at)mac(dot)com>
To: "'Paul Tilles'" <Paul(dot)Tilles(at)noaa(dot)gov>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: doesn't recognize "!=-" (not equal to a negative value)
Date: 2006-07-11 20:41:30
Message-ID: 001501c6a52a$64fa1bc0$1d3210ac@hartt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From a brief and similar session (below), perhaps the best solution is to
simply insert a space between the '=' and the '-'??

Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

Warning: Console code page (437) differs from Windows code page (1252)
8-bit characters may not work correctly. See psql reference
page "Notes for Windows users" for details.

TJHart=# select 0.0 != -9.4;
?column?
----------
t
(1 row)

TJHart=# select 0.0 !=-9.4;
ERROR: operator does not exist: numeric !=- numeric
HINT: No operator matches the given name and argument type(s). You may need
to add explicit type casts.
TJHart=#

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Paul Tilles
Sent: Tuesday, July 11, 2006 12:11 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] doesn't recognize "!=-" (not equal to a negative value)

Version postgres 7.4.7:

Following sql

UPDATE tablename SET value = 0.0 where value!=-9.4;

results in the error message

ERROR: operator does not exist: smallint !=- integer
HINT: No operator matches the given name and argument type(s). You may
need to add explicit type casts.

Seems that postgres has a problem parsing a "not equal negative value".

Anybody know if this is fixed in later versions?

Paul Tilles

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-07-11 20:48:20 Re: doesn't recognize "!=-" (not equal to a negative
Previous Message Tom Lane 2006-07-11 20:34:07 Re: doesn't recognize "!=-" (not equal to a negative value)