Querying and setting a particular bit in a varying bit value

Поиск
Список
Период
Сортировка
От S P Arif Sahari Wibowo
Тема Querying and setting a particular bit in a varying bit value
Дата
Msg-id Pine.LNX.4.42.0112082230210.5732-100000@gede.parokinet.org
обсуждение исходный текст
Список pgsql-general
Hi!

What will be the most efficient way to query the value of a certain bit in
a varying bit field, and what will be the most efficient way to replace
(set/unset) a certain bit in a varying bit field (dynamic length)?

Unfortunately the AND and OR operation require the bits have same length.

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

Thank you.

--
                                   S P Arif Sahari Wibowo
  _____  _____  _____  _____
 /____  /____/ /____/ /____          arifsaha@yahoo.com
_____/ /      /    / _____/       http://www.arifsaha.com/


В списке pgsql-general по дате отправления:

Предыдущее
От: Manuel Sugawara
Дата:
Сообщение: Re: papers on datatype design
Следующее
От: Glen Eustace
Дата:
Сообщение: Weird problem - possibly a bug.