Search Postgresql Archives

Re: Bitmask trickiness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 20, 2010 at 9:59 PM, Howard Rogers <hjr@xxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux