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

From Philip Warner
Subject bit strings - anyone working on them?
Date
Msg-id 5.1.0.14.0.20030422214110.03e9ffc8@mail.rhyme.com.au
Whole thread Raw
Responses Re: bit strings - anyone working on them?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: bit strings - anyone working on them?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: bit strings - anyone working on them?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Having just used bit strings for the first time, I am now aware of some 
features I consider a little odd, and was wondering if (a) they are 
actively being worked on, (b) if they are not considered the way to go, and 
(c) if there would be any interest in the additions/changes indicated below.

1. Length enforcement:
----------------------
    select B'10' | B'1';
   is currently illegal.

ISTM we should return B'11' for this. ie. build the smallest varbit that 
contains the result, and return it.


2. test_bit, set_bit, or get_bit
--------------------------------

These are not implemented for the varbit data type


3. extract_bits
---------------
    extract_bits(varbit bits, int from, int to) returns varbit

would seem useful.


4. Conversion routines
----------------------

Doesn't seem too unreasonable to support varbit<->numeric conversions.




----------------------------------------------------------------
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: Kevin Brown
Date:
Subject: Re: [PERFORM] Foreign key performance
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: For the ametures. (related to "Are we losing