From: Yasir Malik <ymalik@cs.stevens-tech.edu>
To: pgsql-sql@postgresql.org
Subject: Addition and subtraction on BIT type
Date: Sun, 16 Nov 2003 11:18:03 -0500
Message-ID: <Pine.SGI.4.58.0311161117410.129151@guinness.cs.stevens-tech.edu> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ymalik@cs.stevens-tech.edu
Subject: Re: Addition and subtraction on BIT type
In-Reply-To: <Pine.SGI.4.58.0311161117410.129151@guinness.cs.stevens-tech.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox