Re: how to impliment " bit string type + 1 " by SQL ?

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Fri, 02 Jan 2004 01:02:41 GMT
Message-ID: <Rq3Jb.15537$lo3.2515_at_newsread2.news.pas.earthlink.net>


jack_dull wrote:
> I use Bit String Types to encode data in a special application. But
> I don't know how to realize 'bit string + 1' ? for example:
> select B'001'+ B'001';
> is rejected by PostgreSQL.

What answer would you like to get? It is not clear what semantics you seek. The answer could be B'001' or B'001001' or B'010' that I can think of without struggling. If your preferred anwer is B'010', why are you using bit strings and not numbers?

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
Received on Fri Jan 02 2004 - 02:02:41 CET

Original text of this message