How do I use the Binary AND operator in a select? - Mailing list pgsql-novice

From Chris Pizzo
Subject How do I use the Binary AND operator in a select?
Date
Msg-id 000901c2697a$2c7aff20$832aa8c0@itchrisp
Whole thread Raw
In response to virus in download of 7.2.2?  (J Matt Clark <jmattclark@attbi.com>)
Responses Re: How do I use the Binary AND operator in a select?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi everyone,
I'm trying to do a binary AND in a select statement but I get the following
error:
select * from new_tabl where ((col & 64) != 0);

ERROR:  Unable to identify an operator '&' for types 'int4' and 'int4'
        You will have to retype this query using an explicit cast


I'm not sure what's wrong.  col is defined as INTEGER.

Any help would be appreciated.

Chris


pgsql-novice by date:

Previous
From: eric soroos
Date:
Subject: Index use for case insensitive query
Next
From: Tom Lane
Date:
Subject: Re: How do I use the Binary AND operator in a select?