Sqlstatement with !=-1 fails

From: "Dave Cramer" <dave(at)fastcrypt(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Sqlstatement with !=-1 fails
Date: 2001-10-09 15:12:00
Message-ID: 005701c150d4$bead6cd0$8201a8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I get the following error

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

pl=# select * from person where id =-1;
id | name | last_update_time
----+------+------------------
(0 rows)

However this works fine

pl=# select * from person where id != -1;

This looks like a parser error, note the space added in the select that
works ??

Dave

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2001-10-09 15:12:42 Re: Sqlstatement with !=-1 fails
Previous Message Jon Lapham 2001-10-09 15:05:05 Re: ERROR: cannot insert duplicate... on VACUUM ANALYZE