[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-sql
Subject: Re: [SQL] Bitwise operation
From: Rudi Starcevic <rudi () oasis ! net ! au>
Date: 2003-06-30 23:48:01
[Download RAW message or body]
Bruno,Hubert,
Thanks.
It's all crystal clear now.
Now I can keep moving on with my app.
If all goes well I hope to add a 'techdoc' on how to do this.
I've found documents from other DBMS on using Bitwise operations
but not PG.
Cheers
Rudi.
Bruno Wolff III wrote:
>On Mon, Jun 30, 2003 at 22:28:15 +1000,
> Rudi Starcevic <rudi@oasis.net.au> 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
>
>
>
[Attachment #3 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
<div class="moz-text-html" lang="x-western"> Bruno,Hubert,<br>
<br>
Thanks.<br>
It's all crystal clear now.<br>
<br>
Now I can keep moving on with my app.<br>
<br>
If all goes well I hope to add a 'techdoc' on how to do this.<br>
I've found documents from other DBMS on using Bitwise operations<br>
but not PG.<br>
<br>
Cheers<br>
Rudi.<br>
<br>
Bruno Wolff III wrote:<br>
<blockquote type="cite" cite="mid20030630124249.GB26142@wolff.to">
<pre wrap="">On Mon, Jun 30, 2003 at 22:28:15 +1000,
Rudi Starcevic <a class="moz-txt-link-rfc2396E"
href="mailto:rudi@oasis.net.au"><rudi@oasis.net.au></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
</blockquote>
<pre wrap=""><!---->
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
</pre>
</blockquote>
</div>
<br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic