Re: Logical operators don't work - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: Logical operators don't work
Date
Msg-id 20010313144341.A9922@l-t.ee
Whole thread Raw
In response to Logical operators don't work  (darcy@druid.net (D'Arcy J.M. Cain))
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Gunnar R|nning
Date:
Subject: Re: Performance monitor
Next
From: Giles Lean
Date:
Subject: Re: Internationalized error messages