Logical operators don't work

Started by Nonamealmost 25 years ago2 messages
#1Noname
darcy@druid.net

The logical operators '&', '|', '<<' and '>>' as documented on the page
http://www.postgresql.org/devel-corner/docs/postgres/functions.html don't
appear to work as advertised.

darcy=# SELECT 91 & 15;
ERROR: Unable to identify an operator '&' for types 'int4' and 'int4'
You will have to retype this query using an explicit cast

Should this be fixed or should the documentation be changed?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
#2Marko Kreen
marko@l-t.ee
In reply to: Noname (#1)
Re: Logical operators don't work

On Tue, Mar 13, 2001 at 07:18:36AM -0500, D'Arcy J.M. Cain wrote:

The logical operators '&', '|', '<<' and '>>' as documented on the page
http://www.postgresql.org/devel-corner/docs/postgres/functions.html don't
appear to work as advertised.

darcy=# SELECT 91 & 15;
ERROR: Unable to identify an operator '&' for types 'int4' and 'int4'
You will have to retype this query using an explicit cast

Should this be fixed or should the documentation be changed?

When did you do initdb? If it was more than couple of months
ago you may not have them in your system catalogs?

marko=# SELECT 4 & 4;
?column?
----------
4
(1 row)

marko=# SELECT 4 << 4;
?column?
----------
64
(1 row)

--
marko