logo       

Re: Bitwise operation: msg#00342

Subject: Re: Bitwise operation
On Mon, Jun 30, 2003 at 22:28:15 +1000,
  Rudi Starcevic <rudi@xxxxxxxxxxxx> wrote:
> 
> Hi,
> 
> I'm learning to use Postgresql's bitwise operator's as I'm interested
> in building super fast search's based on user selections in web forms.
> 
> So far so good but I have just lost it a little so I thought I'd post.
> Please growl at me if I'm asking on the wrong list :-)
> 
> I understand this:
> 
> SELECT 111 & 11 = 11
> 
> but not this
> 
> SELECT 1111 & 111 = 71
> 
> I was expecting the second example to be 
> 
> SELECT 1111 & 111 = 111

In the above examples the numbers are decimal values.

Maybe you wanted to do something like the following:

area=> select b'1111' & b'0111';
 ?column?
----------
 0111
(1 row)

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe