Re: Bit srting manipulation question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Ericson Smith <eric(at)did-it(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bit srting manipulation question
Date: 2002-10-30 02:41:43
Message-ID: 20021030024143.GC32582@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 29, 2002 at 20:11:27 -0500,
Ericson Smith <eric(at)did-it(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew V. 2002-10-30 03:36:42 Effects of not using NOT NULL
Previous Message Andrew Sullivan 2002-10-30 01:23:49 Re: ps_dump -a