From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: bit strings - anyone working on them? |
Date: | 2003-04-22 16:19:31 |
Message-ID: | 5.1.0.14.0.20030423021348.052353d0@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 2003-04-22 16:32:14 | Re: For the ametures. (related to "Are we losing momentum?") |
Previous Message | Tom Lane | 2003-04-22 16:08:04 | Re: bit strings - anyone working on them? |