X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 0F990310966 for ; Mon, 30 Jun 2003 12:11:04 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 74461-08 for ; Mon, 30 Jun 2003 09:10:53 -0300 (ADT) Received: from water.oasis.net.au (water.oasis.net.au [210.8.139.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1D8A7310908 for ; Mon, 30 Jun 2003 09:10:51 -0300 (ADT) Received: from oasis.net.au (localhost [127.0.0.1]) by water.oasis.net.au (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id WAA09718 for ; Mon, 30 Jun 2003 22:28:15 +1000 X-Authentication-Warning: water.oasis.net.au: Host localhost [127.0.0.1] claimed to be oasis.net.au From: "Rudi Starcevic" To: pgsql-sql@postgresql.org Subject: Bitwise operation Date: Mon, 30 Jun 2003 22:28:15 +1000 Message-Id: <20030630122815.M76087@oasis.net.au> X-Mailer: Open WebMail X-OriginatingIP: 203.221.162.248 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Archive-Number: 200306/333 X-Sequence-Number: 14091 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 Hmm ... Maybe I should search on the web for some more info on how to understand this logic. Math was never my strongest I was always better at creative writing. Any advice much appreciated. Thanks Best Regards Rudi.