Re: bit strings - anyone working on them?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bit strings - anyone working on them?
Date: 2003-04-23 10:49:25
Message-ID: 5.1.0.14.0.20030423204303.02a57008@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2003-04-23 11:14:14 pg_clog woes with 7.3.2 - The Conclusion
Previous Message Lee Kindness 2003-04-23 08:47:06 ECPG thread-safety