Re: Bit srting manipulation question - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Bit srting manipulation question
Date
Msg-id 20021030024143.GC32582@wolff.to
Whole thread Raw
In response to Bit srting manipulation question  (Ericson Smith <eric@did-it.com>)
List pgsql-general
On Tue, Oct 29, 2002 at 20:11:27 -0500,
  Ericson Smith <eric@did-it.com> wrote:
>
> Each position is atomic and represents a certain setting within the set,
> thus: "00100000" would return TRUE if OR'd with "10111011", since the
> 3'rd position matches in both sets.
>
> While I could manually retrieve N records and iterate through them in
> whatever programming language (or possibly a postgresql function), is
> there a way I could natively do this in a WHERE clause in my query?

If you can store them as integers then you can use the binary and and binary
or operators to do this kind of thing.

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: ps_dump -a
Next
From: Ashish Lahori
Date:
Subject: Re: Stream data into Postgres via Perl