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

Поиск
Список
Период
Сортировка
От Tim Hart
Тема Re: doesn't recognize "!=-" (not equal to a negative value)
Дата
Msg-id 001501c6a52a$64fa1bc0$1d3210ac@hartt
обсуждение исходный текст
Ответ на doesn't recognize "!=-" (not equal to a negative value)  (Paul Tilles <Paul.Tilles@noaa.gov>)
Список 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 по дате отправления:

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: troubleshooting 8.1.2
Следующее
От: Paul Tilles
Дата:
Сообщение: Re: doesn't recognize "!=-" (not equal to a negative value)