From: | Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il> |
---|---|
To: | "Vladimir Dobrokhotov" <dvs(at)rybvod(dot)kamchatka(dot)su>, <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: [SQL] binary search |
Date: | 1998-12-15 12:37:46 |
Message-ID: | l0311070cb29c03cd0938@[147.233.159.109] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
At 9:14 +0200 on 14/12/98, Vladimir Dobrokhotov wrote:
> I didn't find in documentation how to do binary search.
> I want to find records where (int2_field AND 8)=TRUE (8).
> Is this possible? Can I use index?
This is not binary search. Binary search is a search method in which you
eliminate half your search domain in each iteration.
If I am reading you right, you want to be able to perform bit-wise
operators. such as bitwise or (like in C: num1 | num2), bitwise and (num1 &
num2), bitwise not and shifts (num1 >> 3, num1 << 8).
I think such operators don't exist in the core PostgreSQL package, though
you may well design them yourself in C.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
From | Date | Subject | |
---|---|---|---|
Next Message | Herouth Maoz | 1998-12-15 13:13:03 | Re: [SQL] Newbie questions |
Previous Message | Jan Wieck | 1998-12-15 09:11:45 | Re: [SQL] CREATE RULE question |