Re: Logical operators don't work

From: Marko Kreen <marko(at)l-t(dot)ee>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: pgsql-hackers(at)PostgreSQL(dot)org
Subject: Re: Logical operators don't work
Date: 2001-03-13 12:43:42
Message-ID: 20010313144341.A9922@l-t.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-03-13 13:19:43 Re: Small bug in pg_dump
Previous Message D'Arcy J.M. Cain 2001-03-13 12:18:36 Logical operators don't work