Varying bit field: to set and query a particular bit

Поиск
Список
Период
Сортировка
От S P Arif Sahari Wibowo
Тема Varying bit field: to set and query a particular bit
Дата
Msg-id Pine.LNX.4.42.0112130945340.15260-100000@macbeth.tirone.com
обсуждение исходный текст
Список 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@yahoo.com
_____/ /      /    / _____/       http://www.arifsaha.com/


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

Предыдущее
От: Luis Amigo
Дата:
Сообщение: excessive performance difference
Следующее
От: "John Winn"
Дата:
Сообщение: Custom Reports