From: | "Eric Ridge" <ebr(at)tcdi(dot)com> |
---|---|
To: | "Postgresql General" <pgsql-general(at)postgresql(dot)org> |
Subject: | query parsing bug? |
Date: | 2001-11-05 05:38:42 |
Message-ID: | D3ADE25911614840BC69C72E3171E4ED02812E@tcdiexch.tcdi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
known behavior or bug?
fr=# select count(*) from foo where foo_id!=-1;
ERROR: Unable to identify an operator '!=-' for types 'int4' and
'int4'
You will have to retype this query using an explicit cast
fr=# select count(*) from foo where foo_id!= -1;
...
(1 row)
Notice the space (or lack thereof) between != and -1. It only seems to
happen with != and a negative number.
fr=# select count(*) from foo where foo_id=-1;
...
(1 row)
fr=# select count(*) from foo where foo_id!=1;
...
(1 row)
This is with 7.1.3, via psql. I haven't tried the query via another
interface (ie, JDBC).
eric
ps, wonder if I should be using <> instead of !=
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Samuel | 2001-11-05 06:09:02 | Re: My new job |
Previous Message | ananth | 2001-11-05 05:31:38 | how to return more than one item from function? |