Re: bit strings - anyone working on them?
От | Philip Warner |
---|---|
Тема | Re: bit strings - anyone working on them? |
Дата | |
Msg-id | 5.1.0.14.0.20030424004359.058a7c18@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | Re: bit strings - anyone working on them? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: bit strings - anyone working on them?
|
Список | pgsql-hackers |
At 10:36 AM 23/04/2003 -0400, Tom Lane wrote: > > Cast(8 as bit(10)) => '0001000000' > > Cast(8 as bit(4)) => '0001' > >That part we could do, I think, if you are willing to abandon the >assumption that the result of casting int to bit(n) and then to bit(m) >should agree with the result of casting int directly to bit(m). I'm not sure I follow the implication; in fact I would hope that: Cast(B'0001' as bit(10)) would yield '0001000000'. > > B'1' # Cast(1 as bit(32)) => '00000000000000000000000000000000' > >Eh? What is the # operator supposed to be doing here? It's the XOR operator. Current implementation has: Cast(B'1' as bit(32)) XOR Cast(1 as bit(32)) giving 10000000000000000000000000000001 Another thing I have forgotten to mention is that there are no text<->varbit conversions. >Perhaps these >operators should only exist for varbit, or should demand inputs already >the same length for bit. That seems like a good idea. I'd prefer to make these changes for varbit only. ---------------------------------------------------------------- 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 по дате отправления: