Re: Sqlstatement with !=-1 fails - Mailing list pgsql-general

From Tom Lane
Subject Re: Sqlstatement with !=-1 fails
Date
Msg-id 3605.1002645185@sss.pgh.pa.us
Whole thread Raw
In response to Re: Sqlstatement with !=-1 fails  ("Dave Cramer" <Dave@micro-automation.net>)
List pgsql-general
"Dave Cramer" <Dave@micro-automation.net> writes:
> pl=# select * from person where id !=-1;
> ERROR:  Unable to identify an operator '!=-' for types 'int8' and 'int4'
>         You will have to retype this query using an explicit cast

This is not a bug.  It's a consequence of wanting to allow user-definable
multicharacter operator names.  See the rules about allowable operator
names,
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/sql-syntax.html#SQL-SYNTAX-OPERATORS

            regards, tom lane

PS: no, != is not an SQL-standard operator name ... <> is.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: cannot insert duplicate... on VACUUM ANALYZE
Next
From: Jon Lapham
Date:
Subject: Re: ERROR: cannot insert duplicate... on VACUUM ANALYZE