Re: bit strings - anyone working on them? - Mailing list pgsql-hackers

From Philip Warner
Subject Re: bit strings - anyone working on them?
Date
Msg-id 5.1.0.14.0.20030423204303.02a57008@mail.rhyme.com.au
Whole thread Raw
In response to Re: bit strings - anyone working on them?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bit strings - anyone working on them?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 12:14 AM 23/04/2003 -0400, Tom Lane wrote:
>Is there a way out of this?  I'm not sure.

The problem will be avoiding breaking existing apps that have adapted to 
current functionality. I have no preference to endianness, but taking the 
current LSB-on-left approach, I would like to see:

Cast(8 as bit(10)) => '0001000000'
Cast(8 as bit(4)) => '0001'
B'1' # Cast(1 as bit(32)) => '00000000000000000000000000000000'
B'101' | B'1001' => '1011'

as well as implement get_bit, set_bit, and numeric<=>varbit conversions.

Can anyone see a way around breaking existing apps?



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/



pgsql-hackers by date:

Previous
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: For the ametures. (related to "Are we losing momentum?")
Next
From: "Dave Page"
Date:
Subject: pg_clog woes with 7.3.2 - The Conclusion