Re: Bitmask trickiness - Mailing list pgsql-general

From John R Pierce
Subject Re: Bitmask trickiness
Date
Msg-id 4C49C8C6.5040803@hogranch.com
Whole thread Raw
In response to Re: Bitmask trickiness  (Howard Rogers <hjr@diznix.com>)
List 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 by date:

Previous
From: Steeles
Date:
Subject: Re: Can WAL files be shipped to multiple servers?
Next
From: Magnus Hagander
Date:
Subject: Re: Can WAL files be shipped to multiple servers?