Re: bit strings - anyone working on them?
От | Philip Warner |
---|---|
Тема | Re: bit strings - anyone working on them? |
Дата | |
Msg-id | 5.1.0.14.0.20030424022221.044b4e38@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 12:02 PM 23/04/2003 -0400, Tom Lane wrote: >and instead >add a separate function that maps an integer to an LSB-first bitstring? This would work, but it's not going to be very friendly without automatic cast support. Does the spec mention LSB and/or numeric conversions? Also, I just noticed that B'0' is not equal to B'00', which also seems unfortunate. Perhaps we could also add an LSB-last function, and output some kind of warning when using numeric casts to the effect that the application should use the LSB-last function because the casts will start using LSB-first in a future version. Alternatively, we could consider creating a new type that works as one would expect: - Automatic casting (sizes and numeric) - Automatic padding - numeric & text conversion - extract_bits using LSB as position1. and one of: - LSB on right - pad on left or - LSB on left - pad on right Another option: can we use some aspect of the type definition to specify the LSB position to store in attyypmod? ---------------------------------------------------------------- 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 по дате отправления: