From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: bit strings - anyone working on them? |
Date: | 2003-04-23 16:38:34 |
Message-ID: | 5.1.0.14.0.20030424022221.044b4e38@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 position 1.
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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-04-23 17:54:58 | Re: First draft of new FE/BE protocol spec posted for comments |
Previous Message | Hiroshi Saito | 2003-04-23 16:37:28 | Re: linking problem with gcc-mingw |