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

From Tim Hart
Subject Re: doesn't recognize "!=-" (not equal to a negative value)
Date
Msg-id 001501c6a52a$64fa1bc0$1d3210ac@hartt
Whole thread Raw
In response to doesn't recognize "!=-" (not equal to a negative value)  (Paul Tilles <Paul.Tilles@noaa.gov>)
List 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@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Paul Tilles
Sent: Tuesday, July 11, 2006 12:11 PM
To: pgsql-general@postgresql.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



pgsql-general by date:

Previous
From: Douglas McNaught
Date:
Subject: Re: troubleshooting 8.1.2
Next
From: Paul Tilles
Date:
Subject: Re: doesn't recognize "!=-" (not equal to a negative value)