How do I use the Binary AND operator in a select?

Поиск
Список
Период
Сортировка
От Chris Pizzo
Тема How do I use the Binary AND operator in a select?
Дата
Msg-id 000901c2697a$2c7aff20$832aa8c0@itchrisp
обсуждение исходный текст
Ответ на virus in download of 7.2.2?  (J Matt Clark <jmattclark@attbi.com>)
Ответы Re: How do I use the Binary AND operator in a select?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: eric soroos
Дата:
Сообщение: Index use for case insensitive query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How do I use the Binary AND operator in a select?