!= should give error? - Mailing list pgsql-hackers

From Rajkumar Raghuwanshi
Subject != should give error?
Date
Msg-id CAKcux6ns5QXmPVzokxBDgWdz1J4kDVbmEbWNcd7hqx+k_ngbmg@mail.gmail.com
Whole thread Raw
Responses Re: != should give error?  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hi,

with below query I am getting unexpected output. here !<space>= is behaving as =
is this expected behaviour?

postgres=# create table tbl (col_a int, col_b int);
CREATE TABLE
postgres=# insert into tbl values (1,2);
INSERT 0 1
postgres=# insert into tbl values (2,1);
INSERT 0 1
postgres=# select * from tbl where col_a ! = 1;
 col_a | col_b
-------+-------
     1 |     2
(1 row)


postgres=# select * from tbl where col_a = 1;
 col_a | col_b
-------+-------
     1 |     2
(1 row)

Thanks & Regards,
Rajkumar Raghuwanshi
QMG, EnterpriseDB Corporation

pgsql-hackers by date:

Previous
From: Haisheng Yuan
Date:
Subject: Re: Bitmap table scan cost per page formula
Next
From: Craig Ringer
Date:
Subject: Re: Using ProcSignal to get memory context stats from a running backend