Re: bit strings - anyone working on them? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bit strings - anyone working on them?
Date
Msg-id 23924.1051071259@sss.pgh.pa.us
Whole thread Raw
In response to Re: bit strings - anyone working on them?  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: bit strings - anyone working on them?  (Philip Warner <pjw@rhyme.com.au>)
Re: bit strings - anyone working on them?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> See my earlier post in this thread questioning which was the low order bit. 

That seems to be the crux of the matter.  Given the assumption that
padding or truncation occurs on the right of the bitstring, ISTM that
you will only get sensible behavior for integer<->bitstring mappings
if the integer's LSB maps to the leftmost bit of the bitstring.

Yet it would seem a tad odd to make 8 map to B'0001'.  I sure don't
find that natural.

Is there a way out of this?  I'm not sure.  I don't think that the SQL
spec's bitstring definitions are really intended to allow sensible
mappings to integer values --- so maybe there is no way to satisfy the
spec and have natural integer mappings at the same time.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: bit strings - anyone working on them?
Next
From: "Andrew Dunstan"
Date:
Subject: Re: Are we losing momentum?