On Wed, May 12, 2004 at 08:17:39 -0400, Mike Rylander <miker@purplefrog.com> wrote:
>
> The easiest way is to test for a bit using bitwise and:
>
> SELECT * FROM table WHERE (status & 2::BIGINT) <> 0 AND (status & 8::BIGINT) =
> 0;
The following will probably be a bit faster:
SELECT * FROM table WHERE (status & 10::BIGINT) = 8;