Skip site navigation (1) Skip section navigation (2)

Re: binary operators on integers

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: binary operators on integers
Date: 2001-01-20 15:31:28
Message-ID: 20010120173127.A10475@l-t.ee (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Fri, Jan 19, 2001 at 04:30:09PM -0500, Bruce Momjian wrote:
> Looks like this is fixed:
> 	
> 	test=> select 5 & ~ 6;
> 	ERROR:  Unable to identify a right operator '&' for type 'int4'
> 	        You may need to add parentheses or an explicit cast
> 	test=> select 5 & (~ 6);
> 	 ?column? 
> 	----------
> 	        1
> 	(1 row)

I can still reproduce it:

marko=# SELECT 5 & ~6;
ERROR:  Unable to identify a right operator '&' for type 'int4'
        You may need to add parentheses or an explicit cast


Or did you mean it can be fixed with parenthesis?  That was the
case from the beginning.


> 
> > This patch was installed, with xor as "#".  The parser still needs work.  
> > Besides the known issue of "|", this also parses funny:
> > 
> > => select 5 & ~ 6;
> > ERROR:  Unable to identify a right operator '&' for type 'int4'
> > 

-- 
marko


In response to

Responses

pgsql-hackers by date

Next:From: Marko KreenDate: 2001-01-20 15:53:37
Subject: status of 64bit ints? was: Re: Transaction ID wraparound: problem and proposed solution
Previous:From: Magnus HaganderDate: 2001-01-20 13:28:45
Subject: Postgresql on win32

pgsql-patches by date

Next:From: Tom LaneDate: 2001-01-20 18:31:49
Subject: Re: [PATCHES] binary operators on integers
Previous:From: Bruce MomjianDate: 2001-01-19 21:30:09
Subject: Re: binary operators on integers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group