Varying bit field: to set and query a particular bit

From: S P Arif Sahari Wibowo <arifsaha(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Varying bit field: to set and query a particular bit
Date: 2001-12-13 15:46:04
Message-ID: Pine.LNX.4.42.0112130945340.15260-100000@macbeth.tirone.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi!

Do you know what is the most efficient way to replace (set/unset) a
certain bit in a varying bit field (dynamic length), and what is the most
efficient way to query the value of a certain bit in a varying bit field?

Right now the easiest way seems to use substring function, but this
function apparently will use a lot of expensive bit shifting.
Is there any better way?

Unfortunately the AND and OR operation require the bits have same length.
Is there any way to AND or OR two bit string with different length?
Is there any way to extend the length of a bit string to a specified
length?

Thank you.

--
S P Arif Sahari Wibowo
_____ _____ _____ _____
/____ /____/ /____/ /____ arifsaha(at)yahoo(dot)com
_____/ / / / _____/ http://www.arifsaha.com/

Browse pgsql-novice by date

  From Date Subject
Next Message Masaru Sugawara 2001-12-13 16:42:47 Re: excessive performance difference
Previous Message Luis Amigo 2001-12-13 12:35:16 excessive performance difference