Addition and subtraction on BIT type - Mailing list pgsql-sql

From Yasir Malik
Subject Addition and subtraction on BIT type
Date
Msg-id Pine.LNX.4.58.0311161108090.26810@heineken.cs.stevens-tech.edu
Whole thread Raw
List pgsql-sql
Hello,
Is there a way to do addition and subtraction on BIT types?  For example,
for
creat table test (a BIT(3));
insert into test values (B'101');

select a + 1 from test; fails

and select a::smallint + 1 from test; also fails.

In addition, is there a way to change the bit of a bit string?  For
example change a 1 to a 0 or vice versa.

Any suggestions?
Thanks,
Yasir


pgsql-sql by date:

Previous
From: "Randolf Richardson, DevNet SysOp 29"
Date:
Subject: Re: Expressional Indexes
Next
From: Yasir Malik
Date:
Subject: Re: Arrays - a good idea?