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 3110.1051025503@sss.pgh.pa.us
Whole thread Raw
In response to 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>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
>      select B'10' | B'1';
>     is currently illegal.

> ISTM we should return B'11' for this. ie. build the smallest varbit that 
> contains the result, and return it.

Why would that be the correct answer and not B'10' --- ie, which end of
the shorter string should get padded?  If anything I'd expect to see
padding added on the right.

> Doesn't seem too unreasonable to support varbit<->numeric conversions.

Aren't those there already for conversions to/from int4 and int8?  What
else would you want?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: For the ametures. (related to "Are we losing momentum?")
Next
From: Philip Warner
Date:
Subject: Re: bit strings - anyone working on them?