Re: Bitmask trickiness - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Bitmask trickiness
Date
Msg-id AANLkTinPMGOBcyiA5ul1DNH6nv3lDblSiCRcBeIukuZG@mail.gmail.com
Whole thread Raw
In response to Bitmask trickiness  (Howard Rogers <hjr@diznix.com>)
List pgsql-general
On Tue, Jul 20, 2010 at 9:59 PM, Howard Rogers <hjr@diznix.com> wrote:
> Suppose 1=Red, 2=Yellow, 4=Green and 8=Orange.
>
> Now suppose the following data structures and rows exist:
>
> create table coloursample (recid integer, colour integer, descript varchar);
> insert into coloursample values (1,2,'Yellow only');
> insert into coloursample values (2,10,'Yellow and Orange');
> insert into coloursample values (3,11,'Red, Yellow and Orange');
> insert into coloursample values (4,12,'Green and Orange');
> insert into coloursample values (5,13,'Red, Green and Orange');

Is there a reason you're avoiding bit strings?
http://www.postgresql.org/docs/8.3/interactive/datatype-bit.html
http://www.postgresql.org/docs/8.3/interactive/functions-bitstring.html

pgsql-general by date:

Previous
From: "pdovera@tiscali.it"
Date:
Subject: Re: INSERT RETURNING and partitioning
Next
From: Jan Otto
Date:
Subject: Re: INSERT RETURNING and partitioning