From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Howard Rogers <hjr(at)diznix(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Bitmask trickiness |
Date: | 2010-07-21 08:08:16 |
Message-ID: | AANLkTinPMGOBcyiA5ul1DNH6nv3lDblSiCRcBeIukuZG@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 20, 2010 at 9:59 PM, Howard Rogers <hjr(at)diznix(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Otto | 2010-07-21 08:17:28 | Re: INSERT RETURNING and partitioning |
Previous Message | pdovera@tiscali.it | 2010-07-21 08:02:54 | Re: INSERT RETURNING and partitioning |