Re: bit strings - anyone working on them?
От | Philip Warner |
---|---|
Тема | Re: bit strings - anyone working on them? |
Дата | |
Msg-id | 5.1.0.14.0.20030423021348.052353d0@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | Re: bit strings - anyone working on them? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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 по дате отправления: