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.20030423021348.052353d0@mail.rhyme.com.au
Whole thread Raw
In response to Re: bit strings - anyone working on them?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 12:08 PM 22/04/2003 -0400, Tom Lane wrote:
>regression=# select cast(8 as bit(32));
>                bit
>----------------------------------
>  00000000000000000000000000001000
>(1 row)

That's also a little scary. "select cast(8 as bit(64))" is not what one 
would expect either, except if you view it as a cast to bit(32) followed by 
bit(64).

It's also sad that substring (which is I think the only get_bit-like 
function) starts at the left. I would have expected the low order bits in 
this model to be at the left, so Cast(X as bit(N)) would work consistently.

We still seem to be lacking > 64 bit numeric support (which is where I was 
coming from with the varbit<->numeric suggestion).

Is there a view as to which bit should be considered low order?

Or is there a better data type for arbitrary length bit masks?


----------------------------------------------------------------
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: Tom Lane
Date:
Subject: Re: bit strings - anyone working on them?
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: For the ametures. (related to "Are we losing momentum?")