Re: Bitmask trickiness

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Bitmask trickiness
Дата
Msg-id 4C49C8C6.5040803@hogranch.com
обсуждение исходный текст
Ответ на Re: Bitmask trickiness  (Howard Rogers <hjr@diznix.com>)
Список pgsql-general

the universal solution is a AND with one mask (which has a 1 in every
position you wish to test for and a zero in each position you wish to
ignore) and an XOR with another mask (that has a 1 in each position that
you want to test for a 1 and a zero in each position that you wish to
test for a 0)), then a test if the result is == zero.

in a language like SQL, this could be simplified to a AND with MASK1 and
a COMPARE for equality with MASK2, with the same result.

-jrp
  (old assembler programmer)



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

Предыдущее
От: Steeles
Дата:
Сообщение: Re: Can WAL files be shipped to multiple servers?
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Can WAL files be shipped to multiple servers?